Sub SplitterEnOnglet() ' - de 1 sec pour 20.000 lignes
' T = Timer()
Set f = Sheets("données")
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Set Rng = f.Range("A2:F" & f.[A65000].End(xlUp).Row) ' rng est une place de A à C
Rng.Sort key1:=f.[E2] ' trier avant sur la colonne choisie ("E" ici)
' copie des colonne A à E dans une matrice
a = Rng
i = 1: n = 0
Do While i <= UBound(a)
code = a(i, 5)
Do While a(i, 5) = code
Debug.Print i, a(i, 5)
i = i + 1: If i > UBound(a) Then Exit Do
Loop
On Error Resume Next: Sheets(code).Delete: On Error GoTo 0
Sheets.Add After:=Sheets(Sheets.Count)
ActiveSheet.Name = code
f.Cells(2 + n, 1).Resize(i - 1 - n, 6).Copy [A2]
f.[A1:F1].Copy [a1]
n = i - 1
Loop
' MsgBox Timer() - T
End Sub