ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Unexpected logical 'IF' response (https://www.excelbanter.com/excel-worksheet-functions/76169-unexpected-logical-if-response.html)

bikergsx

Unexpected logical 'IF' response
 

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.


--
bikergsx
------------------------------------------------------------------------
bikergsx's Profile: http://www.excelforum.com/member.php...o&userid=28834
View this thread: http://www.excelforum.com/showthread...hreadid=520515



Unexpected logical 'IF' response
 
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.

"bikergsx" wrote in
message ...

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.


--
bikergsx
------------------------------------------------------------------------
bikergsx's Profile:
http://www.excelforum.com/member.php...o&userid=28834
View this thread: http://www.excelforum.com/showthread...hreadid=520515




Ardus Petus

Unexpected logical 'IF' response
 
Works by me.

Are you SURE P44 and Q44 are valid dates (not text) ?
--
AP

"bikergsx" a écrit
dans le message de
...

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.


--
bikergsx
------------------------------------------------------------------------
bikergsx's Profile:

http://www.excelforum.com/member.php...o&userid=28834
View this thread: http://www.excelforum.com/showthread...hreadid=520515




bikergsx

Unexpected logical 'IF' response
 

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.


--
bikergsx
------------------------------------------------------------------------
bikergsx's Profile: http://www.excelforum.com/member.php...o&userid=28834
View this thread: http://www.excelforum.com/showthread...hreadid=520515


bikergsx

Unexpected logical 'IF' response
 

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 **


--
bikergsx
------------------------------------------------------------------------
bikergsx's Profile: http://www.excelforum.com/member.php...o&userid=28834
View this thread: http://www.excelforum.com/showthread...hreadid=520515



All times are GMT +1. The time now is 02:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com