1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| Sub test()
'on prend les 5 colonne dans une variable tableau
tableau = Range("A1:f" & Cells(Rows.Count, 1).End(xlUp).Row)
vecteur = Split(Application.Rept("a,", UBound(tableau)), ",")
For i = LBound(tableau) To UBound(tableau)
tableau(i, 6) = ""
chaine = Join(Array(tableau(i, 1), tableau(i, 2), tableau(i, 3), tableau(i, 4), tableau(i, 5)), "-")
vecteur(i) = chaine
A = WorksheetFunction.Match(chaine, vecteur, 0)
'Debug.Print i & "|" & A - 1 & " " & chaine
'If i <> A - 1 Then tableau(i, 6) = "X"
'ou si on travaille sur le sheets lui même
If i <> A - 1 Then Cells(i, 6) = "X"
Next
'Columns("F").SpecialCells(xlCellTypeConstants).EntireRow.Delete
End Sub |
Partager