I am using this code:
Dim rng As Range, cell As Range
Set rng = Range("C1:AO1")
For Each cell In rng
If cell.Offset(0, 2).Value = "#N/A" Then
cell.Interior.Color = vbGreen
cell.Interior.Color = xlAutomatic
to try and do the following:
Look at row 3
(in row 3 there is a IF,ISNA,Lookup and I'm trying to return a green shading (in Row 1) above any cell that has nothing returned).
Instead - I'm getting all of row 1 from C to AO changing to green.
How can I adapt this please?
Ultimately I am trying to add a macro button to turn on or off cell shading in row 1.