Report

Conditional Formatting based on year [Solved]

Ask a question BrianGreen 879Posts Saturday January 17, 2015Registration date September 27, 2016 Last seen - Latest answer on Feb 2, 2016 01:23PM
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.
See more 
Helpful
+0
moins plus
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

Add comment

Members get more answers than anonymous users.

Being a member gives you detailed monitoring of your requests.

Being a member gives you additional options.

Not a member yet?

sign-up, it takes less than a minute and it's free!