Hi...I am trying to write a macro that highlights a cell that has past date. For example, if cell O12 has '11/15/2009' then I like that cell to be highlighted in light yellow (color index 6). I can do this using conditional formatting but I want this part of my macro. Below is what I have started.
[code\]
For i = lastRow To 2 Step -1
If Range("O" & i).Value = vbNullString And Range("O" & i).Value < 'today date 'Then
Range("O" & i).Interior.ColorIndex = 6
Else
[code/]
Thank you for your time.
[code\]
For i = lastRow To 2 Step -1
If Range("O" & i).Value = vbNullString And Range("O" & i).Value < 'today date 'Then
Range("O" & i).Interior.ColorIndex = 6
Else
[code/]
Thank you for your time.