K
Keith Tizzard
I have a number of cells in a spreadsheet each of which displays a date (the expiry date of some item).
I want to be able to highlight those that are within 30 days of today.
I have set a cell B17 as =Today()
and cell D17 as B17+30
Then I have added the conditional format
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula1:="=""D17"""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent4
.TintAndShade = 0.599963377788629
End With
This works.
However I would like not to have to have the two cells B17 and D17.
Is it possible to have a condition that is in effect:
< Today() + 30 ?
Jim
I want to be able to highlight those that are within 30 days of today.
I have set a cell B17 as =Today()
and cell D17 as B17+30
Then I have added the conditional format
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula1:="=""D17"""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent4
.TintAndShade = 0.599963377788629
End With
This works.
However I would like not to have to have the two cells B17 and D17.
Is it possible to have a condition that is in effect:
< Today() + 30 ?
Jim