Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bikergsx
 
Posts: n/a
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ardus Petus
 
Posts: n/a
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bikergsx
 
Posts: n/a
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bikergsx
 
Posts: n/a
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write a formula so that response is value? Kaputa Excel Discussion (Misc queries) 2 January 5th 06 10:20 PM
SUM for logical values tjtjjtjt Excel Discussion (Misc queries) 6 November 16th 05 01:30 AM
polar response DaveT Excel Discussion (Misc queries) 1 November 4th 05 03:29 AM
Equation giving unexpected results Mike K Charts and Charting in Excel 2 January 27th 05 02:58 PM
Logical test Sooraj Excel Discussion (Misc queries) 2 January 25th 05 12:59 PM


All times are GMT +1. The time now is 02:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"