Sub Macro1()
'Déclaration ===========================
Dim X As Long, Y As Integer, Z As Integer
Dim Plage As Range
'Tri par la première colonne ===========
Columns("A:C").Sort Key1:=Range("A1"), Order1:=xlAscending
'Boucle de séparation ==================
For X = Range("A" & Rows.Count).End(xlUp).Row To 2 Step -1
If Y = 0 Then Y = InStr(Cells(X, "A"), " ")
Cells(X, "A").Select
If Left(Cells(X, "A"), Y) <> Left(Cells(X - 1, "A"), Y) Then
Rows(X).Insert Shift:=xlDown
Cells(X, "A") = "NOM"
Cells(X, "B") = "URL1"
Cells(X, "C") = "URL2"
Range(Cells(X, "A"), Cells(X, "C")).HorizontalAlignment = xlCenter
Rows(X).Insert Shift:=xlDown
Rows(X).Insert Shift:=xlDown
Y = 0
End If
Next X
Rows(X).Insert Shift:=xlDown
Cells(X, "A") = "NOM"
Cells(X, "B") = "URL1"
Cells(X, "C") = "URL2"
Range(Cells(X, "A"), Cells(X, "C")).HorizontalAlignment = xlCenter
'Crétion des listes ====================
For X = 1 To Range("A" & Rows.Count).Row
If Range("A" & X) <> "" Then
Y = X
X = Range("A" & X).End(xlDown).Row
Z = Z + 1
Set Plage = Range(Range("A" & Y), Range("C" & X))
ActiveSheet.ListObjects.Add(xlSrcRange, Plage, , xlYes).Name = "Liste_" & Z
X = X + 1
End If
Next X
End Sub