Full Version: IF Statement
Financier
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...

=IF(A1>DATE(2007,1,1),.0085,.001)

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?

Thanks
Mykal73
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)
Financier
I typed it in as follows.....

=IF(D6>DATE(2007,1,1),0.0085,IF(D6>DATE(2007,1,18),0,0.01))

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.
MattJ
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.

HTH
Matt
Financier
That makes sense and changing that fixed it. Thanks to both of you for the help.
MattJ
np!