Sub traitement()
Application.ScreenUpdating = False
extraction
nettoyage
finition
End Sub
Private Sub extraction()
Dim i&, c&
For i = 2 To Range("A" & Rows.Count).End(xlUp).Row
For c = 1 To Len(Cells(i, 1))
With Cells(i, 1).Characters(c, 1)
If .Text = "," Then mot = mot & "|"
If .Font.Underline = xlUnderlineStyleSingle Then
mot = mot & Mid(Cells(i, 1).Value, c, 1)
End If
End With
Next c
Cells(i, 2).Value = mot
mot = ""
Next i
End Sub
Private Sub nettoyage()
Dim vArr
vArr = Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1))
Columns(2).TextToColumns _
Destination:=Range("C1"), DataType:=xlDelimited, _
Other:=True, OtherChar:="|", _
FieldInfo:=vArr
End Sub
Private Sub finition()
Dim i&, lr&
lr = Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To lr
Range("C" & i, "Z" & i).Sort _
Key1:=Range("C" & i), Order1:=xlAscending, Header:=xlNo, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlLeftToRight, DataOption1:=xlSortNormal
Next i
End Sub