+ Reply to Thread
Results 1 to 5 of 5

Help with IF

  1. #1
    Registered User
    Join Date
    06-26-2006
    Posts
    2

    Help with IF

    can anyone tell me why this formula works =IF(AND(G7<(TODAY()-15),I7=TRUE),"OK","contract required")

    but this one doesn't

    =IF(AND(G7<(TODAY()-15),I7=yes),"OK","contract required")

    it's driving me mad...

    thanks!

    Mel x

  2. #2
    David Biddulph
    Guest

    Re: Help with IF

    "mmm1106" <[email protected]> wrote in
    message news:[email protected]...
    >
    > can anyone tell me why this formula works
    > =IF(AND(G7<(TODAY()-15),I7=TRUE),"OK","contract required")
    >
    > but this one doesn't
    >
    > =IF(AND(G7<(TODAY()-15),I7=yes),"OK","contract required")
    >
    > it's driving me mad...


    Because unless you have defined yes as a name, Excel doesn't recognise it.
    If you want to look for yes as a text string, you need to put it in double
    quotes, just as you've done with the strings "OK" and "contract required".
    By contrast, TRUE is a logical value which Excel recognises.
    --
    David Biddulph



  3. #3
    Max
    Guest

    Re: Help with IF

    Maybe the 2nd formula should read as:
    =IF(AND(G7<(TODAY()-15),I7="yes"),"OK","contract required")

    i.e. I7="yes" instead of just: I7=yes
    (Without the double quotes, yes would be interp'd as a defined name)
    --
    Max
    Singapore
    http://savefile.com/projects/236895
    xdemechanik
    ---


    "mmm1106" wrote:

    >
    > can anyone tell me why this formula works
    > =IF(AND(G7<(TODAY()-15),I7=TRUE),"OK","contract required")
    >
    > but this one doesn't
    >
    > =IF(AND(G7<(TODAY()-15),I7=yes),"OK","contract required")
    >
    > it's driving me mad...
    >
    > thanks!
    >
    > Mel x
    >
    >
    > --
    > mmm1106
    > ------------------------------------------------------------------------
    > mmm1106's Profile: http://www.excelforum.com/member.php...o&userid=35786
    > View this thread: http://www.excelforum.com/showthread...hreadid=555505
    >
    >


  4. #4
    Registered User
    Join Date
    06-26-2006
    Posts
    2
    thanks max - it worked!!

  5. #5
    Max
    Guest

    Re: Help with IF

    Glad to hear that (from us <g>) !
    --
    Max
    Singapore
    http://savefile.com/projects/236895
    xdemechanik
    ---
    "mmm1106" wrote:
    >
    > thanks max - it worked!!


+ 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