Hoping for some assistance, in brief I'm trying to apply a conditional format to a column based on a a number of days, the first condition below will highlight the cell if the date is less than today's date which works perfectly. The next condition I would like it to change the colour of the cell to amber only if the date is between today and 90 days and then a final condition would be to colour the cell green if it is beyond 90 days.
I've tried every variation going and searched high-and-low but can't quite figure it out.
Thanks in advance.
'Support End Date (Less Than Today)
With ThisWorkbook.Worksheets("Output").Range("H2:H1000").FormatConditions
.Add Type:=xlExpression, Formula1:="=AND(H2<>"""",H2<TODAY())"
With .Item(.Count)
.Interior.Color = 255
.SetFirstPriority
End With
'Support End Date (Between Today and 90 Days)
With ThisWorkbook.Worksheets("Output").Range("H2:H1000").FormatConditions
.Add Type:=xlExpression, Formula1:="=AND(H2<>"""",H2>TODAY())"
With .Item(.Count)
.Interior.Color = RGB(255, 102, 0)
.SetFirstPriority
End With
'Support End Date (91 Days Onwards)
With ThisWorkbook.Worksheets("Output").Range("H2:H1000").FormatConditions
.Add Type:=xlExpression, Formula1:="=AND(H2<>"""",H2>TODAY())"
With .Item(.Count)
.Interior.Color = RGB(153, 204, 0)
.SetFirstPriority
End With
I've tried every variation going and searched high-and-low but can't quite figure it out.
Thanks in advance.
'Support End Date (Less Than Today)
With ThisWorkbook.Worksheets("Output").Range("H2:H1000").FormatConditions
.Add Type:=xlExpression, Formula1:="=AND(H2<>"""",H2<TODAY())"
With .Item(.Count)
.Interior.Color = 255
.SetFirstPriority
End With
'Support End Date (Between Today and 90 Days)
With ThisWorkbook.Worksheets("Output").Range("H2:H1000").FormatConditions
.Add Type:=xlExpression, Formula1:="=AND(H2<>"""",H2>TODAY())"
With .Item(.Count)
.Interior.Color = RGB(255, 102, 0)
.SetFirstPriority
End With
'Support End Date (91 Days Onwards)
With ThisWorkbook.Worksheets("Output").Range("H2:H1000").FormatConditions
.Add Type:=xlExpression, Formula1:="=AND(H2<>"""",H2>TODAY())"
With .Item(.Count)
.Interior.Color = RGB(153, 204, 0)
.SetFirstPriority
End With