How to Get Date of Each Cell....
Conditional formatting would be much simpler than writing code. Have
you already tried that option?
You would need to change your code a little to make it work. Here is
some untested code to take a look at:
Sub test()
Set rng = ActiveCell.EntireRow
For Each Cell In rng
If DateValue(Cell.Value) <= (Now() - 1) Then
With Cell.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
End If
Next
End Sub
|