Highlighting cells that are over 48hrs old


Posted by Scott on August 17, 2000 5:02 PM

I have a column of date/times that I need to conditional format to highlight red if they are over 48hrs older than NOW. Any suggestions?

Posted by David on August 18, 0100 1:29 AM


Sub answerIhope()

columnnum = 1
For x = 1 To 10
If Now - Cells(x, columnnum) > 2 Then
Cells(x, columnnum).Select
Selection.Font.ColorIndex = 3
End If
Next x

End Sub


Posted by Tim Francis-Wright on August 18, 0100 7:22 AM

I would just use conditional formatting (in
Excel 97 and later):
[Format/Conditional Formatting]

Set Condition 1 to be
Cell Value < NOW()-2
and set the format to be the red pattern that you want.

HTH



Posted by Scott on August 18, 0100 5:52 PM

David,
Thanks...that worked like a champ. I had to fiddle with it a bit to get the range correct, but it does exactly what I want.