Conditional formatting and formula

J

jonas.ornborg

Hi, I am trying to write a formula within the conditional formatting
dialog box. I have a column with dates and I wont the cell to become
red whenever the date in the cell is more then 3 years older then
todays date. Does anyone have an idea of how to write this formula?

I have tried this formula but it doesnt seem to work

=DATEDIF(J3;TODAY();"y">3)

All the best
Jonas
 
M

Mark Lincoln

This way should work:

=DATEDIF(J3;TODAY();"y")>2

First of all, you had the ">3" test within the DATEDIF function.
Secondly, DATEDIF will return only the whole number of years between
the two dates. So if the formula equals 3, there are at least 3 years
between the dates. That's why you want to test for >2.
 
J

jonas.ornborg

Thanks!
It worked perfect! I guessed I had written the formula wrong bu
couldnt find out what.

Again, many thanks!

All the best Jonas:
 
Top