Sub Doublons()
Dim i As Integer, k As Integer
Dim nom1 As String, nom2 As String 'déclare les variables nom1 et nom2
Dim tl() As Long 'déclare le tableau de variables tl (Tableau Lignes)
Dim x As Long 'déclare la variable x (incrément)
For i = 2 To Range("J65536").End(xlUp).Row
nom1 = Range("J" & i).Value
For k = i + 1 To Range("J65536").End(xlUp).Row
nom2 = Range("J" & k).Value
If nom2 = nom1 Then
ReDim Preserve tl(x) 'redimentionne le tableau de variable tl
tl(x) = IIf(Cells(i, 10).Interior.ColorIndex = 4, k, i) 'récupère le numéro de ligne (k si i est verte, sinon i)
x = x + 1 'incrémente x
End If
Next k
Next i
For x = UBound(tl) To LBound(tl) Step -1 'boucle inversée sur toutes les variable du tableau tl
Rows(tl(x)).Delete 'supprime la ligne
Next x 'prochaine variable de la boucle
End Sub