Hey Guys,
I'm trying to write an if and statement in VBA to reference columns 15 and 16 (using offset) and tell them that if they are both empty that the interior color needs to stay empty in both.
here is what i have but it isn't working:
Sub mondaytry()
Range("b4:b341").Name = "dashboard"
Range("I1").Name = "today"
For Each cell In Range("dashboard")
If cell.Offset(0, 16) = Range("today") Then cell.Offset(0, 16).Interior.ColorIndex = 8
Next
For Each cell In Range("dashboard")
If IsEmpty(cell.Offset(0, 15)) And IsEmpty(cell.offest(0, 16)) Then
cell.Offset(0, 15).Interior.ColorIndex = 9
cell.Offset(0, 16).Interior.ColorIndex = 9
End If
Next
End Sub
Any Thoughts as to how i can fix it?
THanks,
Rytis
Bookmarks