If Statements with Dates

E

Erika

I am trying to build a If statement using dates, I am getting all True the
forumla I have built is =IF(B65>9/15/06,"true","") B65=9/1/06

What am I doing wrong?
 
B

Bob Phillips

=IF(B65>DATE(2006,9,15),"true","")

or

=IF(B65>--"2006-09-15","true","")


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
B

BoniM

It might be easier, if this is something you do often with different dates,
to enter the date you want to check against in a cell. If 9/15/06 is in cell
D1, then
=if(B65>$D$1,"True","") works as well. Then you can change the date in cell
D1 at anytime without having to re-enter the formula.
 
B

Bob Phillips

Probably because Toppers uses UK style dates, you use US. Which is why you
should never use ambiguous date strings like that, see my earlier response
on how to overcome it.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
T

Toppers

Bob,
Good point (and carelessness on my part in my response). I MUST(!)
use the DATE function in future (write out 100 times).
 
Top