1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| Dim FL1 As Worksheet
Dim Valeur As Variant, c As Range, Valeur2 As Variant, d As Range
Dim NoLigne As Long, DerLig As Long, NoLigne2 As Long, DerLig2 As Long
Set FL1 = Worksheets("TAFEUILLE")
NoLigne = 1
Do
If Not Cells(NoLigne, 4) = "" Then //Colonne D
Valeur = Cells(NoLigne, 4)
Valeur2 = Cells(NoLigne, 3) // Colonne C
Do
With FL1.Range("D" & NoLigne + 1, [D65536].End(xlUp))
DerLig = 0
Set c = .Find(Valeur, LookIn:=xlValues, LookAt:=xlWhole)
If Not c Is Nothing Then
If c.Row > NoLigne Then
With FL1.Range("C" & NoLigne + 1, [C65536].End(xlUp))
Set d = .Find(Valeur2, LookIn:=xlValues, LookAt:=xlWhole)
If Not d Is Nothing Then
DerLig = c.Row
c.EntireRow.Delete
End If
End With
End If
End If
Set c = Nothing
End With
Loop While DerLig > NoLigne
End If
NoLigne = NoLigne + 1
Loop While NoLigne < FL1.Range("D65536").End(xlUp).Row |
Partager