Feb 15 2007, 03:59 PM
I am trying to write an IF statement where a date determines what information is returned. It basically should return 2 diffrent rates based on the date. I need a 3rd criteria in the statement to return nothing if the date is > 01/18/07. I can get the 1/1/07 part to work as follows...
I am not sure how to add a 3rd criteria that tells it if A1>01/18/07, then return 0.
Can anyone advise how to write this portion into the statement?
Feb 15 2007, 04:02 PM
I know this would work in Access so it's worth a shot in excel.
= if (A1 > date(2007,1,1), .0085,IF a1>Date(2007,01,18), 0, .001)
Feb 15 2007, 04:20 PM
I typed it in as follows.....
It returns the 1% if I make the date < 01/01/07 and it returns the .85% if I make the date > 01/01/07. The problem is that when I change the date to something > 01/18/07, the rate stays at .85% when it should be 0.
At least I am not getting any more #VALUE erros so I am on the right track. I will keep tweaking this statement and see if I can get it to work. It might be operator error.
Thanks for the help.
Feb 15 2007, 04:28 PM
The reason is is that the first condition is true. Any date greater thatn 1/18/07 is also greater than 1/1/07. Test for the later date first.
Feb 15 2007, 04:34 PM
That makes sense and changing that fixed it. Thanks to both of you for the help.
Feb 15 2007, 04:35 PM
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here