Bonjour à tous, forum bonjour,
J'ai un tableau qui se présente ainsi
A090 |
50666542 |
C15710 |
C15710-07Q |
D 80 |
40 |
A090 |
50666543 |
C15710 |
C15710-07Q |
E 70 |
80 |
A090 |
50666544 |
C15710 |
C15710-07Q |
E 70 |
80 |
A090 |
50666545 |
C15710 |
C15710-07Q |
E 75 |
80 |
A090 |
50666545 |
C15710 |
C15710-07Q |
E 75 |
80 |
A090 |
50666546 |
C15710 |
C15710-07Q |
E 80 |
80 |
A090 |
50666548 |
C15710 |
C15710-07Q |
E 85 |
40 |
Mon objectif est de supprimer les lignes en double , alors j'ai essai le code suivant
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Sub Macro6()
Application.ScreenUpdating = False
With Sheets("Feuil3")
Derlig = .Range("D2").End(xlDown).Row
For i = 1 To Derlig
For j = 1 To Derlig
If Cells(i, 4) = Cells(j, 4) And Cells(i, 5) = Cells(j, 5) And i <> j Then
Rows(j).Delete
End If
Next j
Next i
End With
End Sub |
ce dernier ne me supprime pas tous les lignes en double dé le premier lancement de macro, il faut la relancer pas mal de fois pour obtenir le résultat désiré
J’en appel à votre aimable soutien si quelqu’un avait la solution
Merci
Partager