+ Reply to Thread
Results 1 to 5 of 5

Unexpected logical 'IF' response

  1. #1
    Registered User
    Join Date
    11-17-2005
    Posts
    5

    Question 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.

  2. #2
    Guest

    Re: 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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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. #3
    Ardus Petus
    Guest

    Re: Unexpected logical 'IF' response

    Works by me.

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

    "bikergsx" <[email protected]> a écrit
    dans le message de
    news:[email protected]...
    >
    > 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. #4
    Registered User
    Join Date
    11-17-2005
    Posts
    5
    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.

  5. #5
    Registered User
    Join Date
    11-17-2005
    Posts
    5

    Smile Thread closed

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1