1 2 3 4 5 6 7 8 9 10 11 12 13 14
| Sub test()
With Sheets("Feuil2")
.Range("A2:A" & .Range("A" & Rows.Count).End(xlUp).Row).Replace What:=" ", Replacement:="|", LookAt:=xlPart
.Range("A2:A" & .Range("A" & Rows.Count).End(xlUp).Row).Replace What:=":", Replacement:="|", LookAt:=xlPart
For L = 2 To .Cells(Rows.Count, 1).End(xlUp).Row
.Cells(L, 1).TextToColumns Destination:=Range("A" & L), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="|", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), _
TrailingMinusNumbers:=True
Next L
End With
End Sub |
Partager