Salut Sweety,
j'ai utilisé la fonction SPLIT pour diviser l'info selon un séparateur, à savoir, dans ce cas, le caractère ASCII 124 : |
[code][/Private Sub cmdSplit_Click()
'
Dim tSplit As Variant
'
If [B3] = "" Then Exit Sub
'
Application.EnableEvents = False
Application.ScreenUpdating = False
'
iRow = Range("A" & Rows.Count).End(xlUp).Row
sLast = Cells(iRow, 1)
'
For x = 2 To Rows.Count
If Cells(x, 2) <> "" Then
sFlag1 = Cells(x, 3)
sFlag2 = " " & Chr$(124) & " "
'
tSplit = Split(sFlag1, sFlag2)
For y = 0 To UBound(tSplit)
If y > 0 Then Range("A" & x + y & ":C" & x + y).Insert shift:=xlDown
Cells(x + y, 3) = tSplit(y)
Next
End If
If Cells(x, 1) = sLast Then Exit For
Next
'
Application.EnableEvents = False
Application.ScreenUpdating = False
'
End Sub
code]
:)
A+