UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> IF Statement    
 
   
Financier
post Feb 15 2007, 03:59 PM
Post #1

New Member
Posts: 16



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
Go to the top of the page
 
+
Mykal73
post Feb 15 2007, 04:02 PM
Post #2

UtterAccess Veteran
Posts: 421
From: Omaha, NE



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)
Go to the top of the page
 
+
Financier
post Feb 15 2007, 04:20 PM
Post #3

New Member
Posts: 16



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.
Go to the top of the page
 
+
MattJ
post Feb 15 2007, 04:28 PM
Post #4

UtterAccess VIP
Posts: 4,621
From: North Carolina, USA



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
Go to the top of the page
 
+
Financier
post Feb 15 2007, 04:34 PM
Post #5

New Member
Posts: 16



That makes sense and changing that fixed it. Thanks to both of you for the help.
Go to the top of the page
 
+
MattJ
post Feb 15 2007, 04:35 PM
Post #6

UtterAccess VIP
Posts: 4,621
From: North Carolina, USA



np!
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th June 2013 - 12:28 AM