Conditional formatting and formula

  • Thread starter Thread starter jonas.ornborg
  • Start date Start date
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
 
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.
 
Thanks!
It worked perfect! I guessed I had written the formula wrong bu
couldnt find out what.

Again, many thanks!

All the best Jonas:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top