I want to change the background of the range A:D into a green color if the cell D contains a date.
the total range is A5:D40 I want this formula to work automatically when the value is inserted in the cell D that the background should change directly
For Each Cel In Range("D5:D40") If Cel.Value <> "" Then Cel.Offset(0, -3).Interior.ColorIndex = 4 Next
this code only changes the offset cell instead of changing the range from A to D
Aucun commentaire:
Enregistrer un commentaire