1 2 3 4 5 6 7 8 9 10 11
| Dim i As Integer 'déclare la variable i (Incrément de ligne)
Dim j As Integer 'déclare la variable j (Incrément de colonne)
For i = 1 To 350
If Cells(i + 6, 4) = Cells(i + 5, 4) And Cells(i + 5, 4).Interior.ColorIndex = 2 Then Rows(i + 6).Interior.ColorIndex = 2
If Cells(i + 6, 4) = Cells(i + 5, 4) And Cells(i + 5, 4).Interior.ColorIndex = 20 Then Rows(i + 6).Interior.ColorIndex = 20
If Cells(i + 6, 4) <> Cells(i + 5, 4) And Cells(i + 5, 4).Interior.ColorIndex = 2 Then Rows(i + 6).Interior.ColorIndex = 20
If Cells(i + 6, 4) <> Cells(i + 5, 4) And Cells(i + 5, 4).Interior.ColorIndex = 2 Then Rows(i + 6).Interior.ColorIndex = 2
Next i
End If |
Partager