Ordre d'exécution du script
Bonjour le forum,
Je m'embrouille avec la définition de l'ordre d'exécution du script:
Code:
1 2 3
| LastLig = Cells(Rows.Count, 1).End(xlUp).Row
For i = LastLig To 2 Step -1
For j = i - 1 To 2 Step -1 |
C'est censé fonctionner de bas en haut et en tant que codeur très débutant ça me déstabilise un tant soit peu... :?
Voici le script:
Code:
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
| Sub IF_written()
Dim Cell As Range
Dim LastLig As Long, i As Long, j As Long
LastLig = Cells(Rows.Count, 1).End(xlUp).Row
For i = LastLig To 2 Step -1
For j = i - 1 To 2 Step -1
For Each Cell In Range("A1:A" & Range("A65536").End(xlUp).Row)
If Cells(i, 2) = Cells(j, 2) Then
Cells(i, 7) = "keep"
If Cells(i, 2) <> Cells(j, 2) Then
Cells(i, 7) = "delete"
End If
End If
Next
Next
Next
End Sub |
J'ai besoin de comprendre le sens de:
Code:
1 2 3
| LastLig = Cells(Rows.Count, 1).End(xlUp).Row
For i = LastLig To 2 Step -1
For j = i - 1 To 2 Step -1 |
Pouvez-vous me traduire cela?
Merci