Sub ventiler()
Dim dico, der&, t, i&, max&, j&, nlig&, nco&, s, x, y
With Sheets("test")
Application.ScreenUpdating = False
Set dico = CreateObject("scripting.dictionary"): dico.CompareMode = TextCompare
If .FilterMode Then .ShowAllData
der = .Cells(Rows.Count, "a").End(xlUp).Row
.Range(.Range("a1"), .Cells(der, "b")).Sort key1:=Range("a1"), order1:=xlAscending, _
key2:=Range("b1"), order2:=xlAscending, Header:=xlYes, MatchCase:=False
t = .Range(.Range("a1"), .Cells(der, "b"))
For i = 2 To UBound(t)
dico(CStr(t(i, 1))) = dico(CStr(t(i, 1))) & "/" & t(i, 2)
Next i
For Each x In dico.Items
j = Len(x) - Len(Replace(x, "/", ""))
If j > max Then max = j
Next x
Erase t
ReDim t(1 To max + 1, 1 To dico.Count)
For Each x In dico.Keys
nlig = 1: nco = nco + 1: t(nlig, nco) = x: s = Split(Mid(dico(x), 2), "/")
For j = 0 To UBound(s)
nlig = nlig + 1
t(nlig, nco) = s(j)
Next j
Next x
.Range("e1").CurrentRegion.Clear
.Range("e1").Resize(UBound(t), UBound(t, 2)).NumberFormat = "@"
.Range("e1").Resize(UBound(t), UBound(t, 2)) = t
.Range("e1").CurrentRegion.Borders.LineStyle = xlContinuous
.Range("e1").CurrentRegion.Rows(1).Font.Bold = True
.Range("e1").CurrentRegion.Rows(1).Font.Color = RGB(0, 0, 255)
End With
End Sub