Sub Macro1()
'
With Sheets("base")
fin = .Range("A" & .Rows.Count).End(xlUp).Row
Debut = 2
Numtab = 1
i = 2
While i <= fin
If Cells(i, 2) <> Cells(i + 1, 2) Then
Rows(1).Copy
Rows(i + 1).Insert shift:=xlDown
Rows(i + 1).Insert shift:=xlDown
'Range("A" & Debut & ":G" & i).Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("A" & Debut - 1 & ":G" & i), , xlYes).Name = "Tableau" & Numtab
Debut = i + 3
Numtab = Numtab + 1
i = i + 3
fin = fin + 2
Else
i = i + 1
End If
Wend
.Rows(fin).Delete
End With
End Sub