1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Sub formatConditionnelle()
couleur = [{"A",8;"B",9;"C",3;"D",4;"E",10;"F",6;"G",7}] 'fonction evaluate
Application.ScreenUpdating = False
For Each C In [B2:B25] 'plage a testée
For lig = LBound(couleur, 1) To UBound(couleur, 1)
If C = couleur(lig, 1) And C.Offset(0, 9) <> "" Then C.Interior.ColorIndex = couleur(lig, 2)
If C.Offset(0, 3) = couleur(lig, 1) And C.Offset(0, 9) <> "" Then C.Offset(0, 3).Interior.ColorIndex = couleur(lig, 2)
Next lig
Next
Application.ScreenUpdating = True
End Sub |
Partager