Hi,
And if the cell is already yellow what do you want to do? Where are the
cell you want this to happen to, what sheet, what range?
Hi,
Here is some sample code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("A1:A10"))
If Not isect Is Nothing Then
Target.Interior.ColorIndex = 6
End If
End Sub
1. To add this code to your file, press Alt+F11,
2. In the VBAProject window, top left side, find your sheet name under your
file name and double click it.
3. Paste in or type the code above.
The will work on the range A1:A10 in the activesheet.