J'ai presque fini ma macro !!
Il me reste juste une erreur de compilation ...Je ne sais plus le message exact , mais cela dis que j'essaye d'utiliser des variables déjà utilisées (ou en cours)
Je pense savoir pourquoi !
Le code :
Sub test()
Dim i As Byte, j As Byte, k As Byte, col As Byte
col = 3
Range("D2:D50,G29:G50").Interior.ColorIndex = xlNone
For i = 2 To 50
If Cells(i, 4) <> "" And Cells(i, 4).Interior.ColorIndex = xlNone Then
For j = 29 To 50
If Cells(i, 4) = Cells(j, 7) Then
Cells(i, 4).Interior.ColorIndex = col
Cells(j, 7).Interior.ColorIndex = col
For k = 2 To 50
If Cells(k, 4) = Cells(i, 4) Then Cells(k, 4).Interior.ColorIndex = col
Next k
End If
Next j
col = col + 1
End If
Next i
End Sub
Ce code se réactualise si je rajoute une ref si j'ai bien compris
Est-il possible d'arrêter cette réactualisation ?
Il ne faudrait pas enlever les lignes " End If " ?
Eric