Unexpected logical 'IF' response

B

bikergsx

Hello,

I have a simple IF formula that appears not to working as expected. It
tests whether a date is between two dates and displays the message
'TODAY' or 'FALSE' if not.

=IF(AND(TODAY()>=P44,TODAY()<Q44),"TODAY","")

where P44 and Q44 are valid dates.

I've used excel's Evaluate Formula dialog box which after testing the
above statement, equates to
IF(FALSE,""TODAY","FALSE")
You would expect the final evaluation would be 'FALSE' in the dialog
box, but it comes up with 'TODAY'.

Mmmmm. I'm confused, am I missing something?

Best regards from the UK,

Rob.
 
G

Guest

Hi
This works fine for me (Excel 2K). I suppose the next step is to post what
is in P44 and Q44, also to try different dates in those cells. Check the
cells are Excel dates and also that your regional settings are correct.

Andy.
 
B

bikergsx

Thanks for the quick replies.

Just re-ran it thru the 'evaluate formula' dialog box again. Here's
what it comes up with...

IF(AND(TODAY()>=P44,TODAY()<Q44),"TODAY", " ")

IF(AND(38785>=38808,38785<38838),"TODAY", " ")
IF(AND(FALSE,TRUE),"TODAY", " ")
IF(AND(FALSE,"TODAY"," ")
TODAY

BTW, the P44 is 01/04/2006, Q44 is 01/05/2006 (UK dates format).
Have just noticed that the formula appears to work first time I write
it in a cell, but not when I copy it to an adjacent cell (with the
appropriate dates reflected). However, the copied cell works if I
click on the contents of that cell and click the green tick box
(without any modification to the contents).

Any further thoughts?

Many thanks,

Rob.
 
B

bikergsx

Thanks for your help. It appears that I had 'updates to calculations'
set to manual, so have altered to automatic.
Many thanks for your prompt replies.
** Rob **
 
Top