Sub SplitAndTransposeData()
Dim nb As Integer
Dim Cellule As Range
nb = 0
ActiveSheet.Range("A2:A4").TextToColumns Destination:=Range("AB2"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1)), TrailingMinusNumbers:=True
For Each Cellule In Range("AB2").CurrentRegion
If Cellule.Value <> "" Then
Cells(1 + nb, 27).Value = Cellule.Value
nb = nb + 1
End If
Next
Range(Range("AA1"), Range("AA20000").End(xlUp)).AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=Range("Z1"), _
Unique:=True
Range("B1:Y1").ClearContents
Range(Range("Z1"), Range("Z1").End(xlDown)).Copy
Range("B1").PasteSpecial _
Paste:=xlPasteValues, _
Operation:=xlPasteSpecialOperationNone, _
SkipBlanks:=True, _
Transpose:=True
Application.CutCopyMode = False
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
Range(Range("B1"), Range("B1").End(xlToRight)).Select
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Add Key:=Selection, _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Feuil1").Sort
.SetRange Selection
.Header = xlGuess
.MatchCase = False
.Orientation = xlLeftToRight
.SortMethod = xlPinYin
.Apply
End With
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
Range("Z1").CurrentRegion.ClearContents
End Sub