Dates Within IF Statements

  • Thread starter Thread starter TONYC
  • Start date Start date
T

TONYC

I am attempting to include dates within an IF statement

for example

=IF(P23>"01/04/04",L23, " ")

I have tried with and without quotation marks. Neither work. Is i
possible to incorporate greater than a specifiied date?

Regards

TON
 
Thank you. I have since found out that the following also works

IF(P23>DATE("01/04/04"),L23, " ")

Regards

TON
 
You're welcome, Tony !
Thanks for posting back,
and for sharing an alternative ..
 
That *should* give you an error when you try to enter it.

Perhaps you meant

=IF(P23>DATE(4,4,1),L23, "")

or, depending on your date convention:

=IF(P23>DATE(4,1,4),L23, "")
 
Perhaps you meant

=IF(P23>DATE(4,4,1),L23, "")

or, depending on your date convention:

=IF(P23>DATE(4,1,4),L23, "")

By "date convention" do you mean the order of month, day, year?

I thought the argument order of the DATE worksheet function was independent of
the date convention.

I guess I can check it ... With XL2002 Win XP Pro it seems to give the same
date result, independent of the date convention (US vs UK). Of course, the
answer is formatted differently.




--ron
 
DATE() *is* independent of the date convention (e.g., d/m/y or m/d/y)

My caveat was due to the OP having used an ambiguous date:
DATE("01/04/04")

so I couldn't be sure which date he meant.
 
I send my apoligies. I did mean to change the date to read



=IF(P23>DATE(2004,4,1),L23, "")

Which does work successfully.

Regards
Ton
 

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