bonjour,
je cherche a modifier le fond d'une cellule en fond du resultat d'une autre cellule a l'aide d'une macro en automatisant l'operation pour toutes les lignes.
Par exemple Si G4="CA" le fond de J4 doit etre bleu. sauf que j'y parvient pas.
voici ma macro
Sub essai()
Dim Nol As Integer
For Nol = 4 To 20
If Range("G" & Nol) = "CA" Then
Range("J" & Nol).With mycell.Interior
.ColorIndex = 5
.Pattern = xlSolid
End With
End If
End Sub