Conditional Formatting based on year [Solved/Closed]

Report
Posts
1010
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
June 16, 2020
-
Posts
1010
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
June 16, 2020
-
Guys,

I come again cap in hand with another plea for help on a sort of finished project, but I want to make it better.

I have some conditional formatting in a group of cells that colours a date cell green if a date is more than 30 days old, yellow if the date is 30 days old or less, or no colour if it has a dot in it. The format rules I have are here:

Cell value = "." ................... No Format Set ........... Stop If True
Cell Value <NOW()-30 .......... Green Background
Cell Value >=NOW()-30 ........ Yellow Background

My question is: how do I amend the rules to be based on the year instead of the day. The final product should turn a cell red if it is a year old. changing the 30 to 365 is no good as this wont take account of leap years.

Any help would be appreciated.

1 reply

Posts
1010
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
June 16, 2020
250
GOT IT = Wheeeeeee ....

instead of using the "NOW()" command I needed "EDATE()

Substituting "EDATE(TODAY(),-12)" where I had "NOW()-30" does the trick.

The final conditional formatting rules are:

Cell value = "." .......... ......... No Format Set ..... Stop If True
Cell Value <EDATE(TODAY(),-12) ...... Green Background
Cell Value >=EDATE(TODAY(),-12) .... Yellow Background