The following VBA macro will highlight today's date and yesterday's date. Of course it can be improved such as condtions modified and added as well as the formatting options. VBA Code:
Sub highlightdates() Application.ScreenUpdating = False Dim c As Variant For Each c In Selection MsgBox Now() - c.Value 'Today If Now() - c.Value <= 1 Then c.Select With Selection.Interior .ColorIndex = 8 .Pattern = xlSolid End With End If 'Yesterday If Now() - c.Value > 1 And Now() - c.Value <= 2 Then c.Select With Selection.Interior .ColorIndex = 6 .Pattern = xlSolid End With End If Next Application.ScreenUpdating = True End Sub