Sub test()
Dim i As Integer, j As Integer
i = 3
Do While Cells(i, "A") <> ""
If Cells(i, "A").Value <> Cells(i + 1, "A").Value Then
j = Cells(i + 1, "A").Row
Rows(j).Insert
i = i + 1
End If
i = i + 1
Loop
End Sub
Sub Insert_Ligne()
Dim i As Integer, sh As Worksheet
Set sh = Sheets("Feuil1")
For i = sh.Cells(Rows.Count, 1).End(xlUp).Row To 3 Step -1
If sh.Cells(i, "A").Value <> sh.Cells(i - 1, "A").Value Then sh.Rows(i).Insert
Next i
End Sub
Sub test()
Dim i As Integer, j As Integer
i = 3
Do While Cells(i, "A") <> ""
If Cells(i, "A").Value <> Cells(i + 1, "A").Value Then
j = Cells(i + 1, "A").Row
Rows(j).Insert
i = i + 1
End If
i = i + 1
Loop
End Sub
Copie de FORUM 031218-2.xlsm
Cordialement,
Edit: ...........Bonsoir Jean-Eric
Merci Xorsankulkai de ton retour, J'ai la macro qu'il me faut et qui répond à ma demande.
Sub Insert_Ligne()
Dim i As Integer, sh As Worksheet
Set sh = Sheets("Feuil1")
For i = sh.Cells(Rows.Count, 1).End(xlUp).Row To 3 Step -1
If sh.Cells(i, "A").Value <> sh.Cells(i - 1, "A").Value Then sh.Rows(i).Insert
Next i
End Sub
Merci Sabv de ton retour, J'ai la macro qu'il me faut et qui répond à ma demande.