cibleo
XLDnaute Impliqué
Bonjour le forum,
Pour bien comprendre, voyez le résultat obtenu en cliquant en Feuil4.
Maintenant, j'aimerais obtenir ce qui est illustré en Feuil2.
Je n'arrive pas à modifier les variables lig et col pour obtenir une transposition par bloc de 3
Pouvez-vous m'éclairer ?
Cibleo
Pour bien comprendre, voyez le résultat obtenu en cliquant en Feuil4.
VB:
Sub Split_Transpose_Desserte1()
'En colonne A, les donnees à splitter
Dim C As Range, Item As Variant, col As Long, lig As Long
Application.ScreenUpdating = False
col = 2
For Each C In Range([A1], Cells(Rows.Count, 1).End(xlUp))
lig = 2
temp = Replace(C, ", ", " - ")
For Each Item In Split(C.Value, ", ")
Cells(lig, col) = Item
lig = lig + 1
Next Item
'''Mise en Forme
'Blablabla
Cells(2, col).Offset(, 1).Resize(1, 3).Value = "-"
'''Fin de la mise en forme
col = col + 4
Next C
Application.ScreenUpdating = True
'lig = Feuil4.Range("B" & Rows.Count).End(xlUp).Row + 2
End Sub
Je n'arrive pas à modifier les variables lig et col pour obtenir une transposition par bloc de 3
Pouvez-vous m'éclairer ?
Cibleo