+ Reply to Thread
Results 1 to 8 of 8

OR function within an IF formula

  1. #1
    Registered User
    Join Date
    09-01-2012
    Location
    Staffordshire, England
    MS-Off Ver
    O365
    Posts
    129

    OR function within an IF formula

    =IF(OR([Task Name]12 = "", "", [Due Date]12 < TODAY(), IF(AND(Status12 = "Complete", [Completed date]12 <= [Due Date]12, ISDATE([Completed date]12)), "PASS", "FAIL")))

    This is being returned as 'Missing or Invalid Parameters'. (this formula is in Smartsheet rather than Excel hence the different cell references). Please help.

    IF OR Error.xlsx

  2. #2
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,883

    Re: OR function within an IF formula

    OR([Task Name]12 = "", "",

    So shouldn't there be a second condition instead of another set of "" ?
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  3. #3
    Registered User
    Join Date
    09-01-2012
    Location
    Staffordshire, England
    MS-Off Ver
    O365
    Posts
    129

    Re: OR function within an IF formula

    Ok, so have removed the second set of "" but still not working:

    =IF(OR([Task Name]12 = "", [Due Date]12 < TODAY(), IF(AND(Status12 = "Complete", [Completed date]12 <= [Due Date]12, ISDATE([Completed date]12)), "PASS", "FAIL")))

  4. #4
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,883

    Re: OR function within an IF formula

    I assume the or is a test of two parameters before going into the second IF. In that case, where is the ending parenthesis of the OR?

  5. #5
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: OR function within an IF formula

    I think error is in the third paramether of the OR function. In the AND function you put three paramethers and right after closed the second IF function. Complete the function and satisfy every parameter

  6. #6
    Registered User
    Join Date
    09-01-2012
    Location
    Staffordshire, England
    MS-Off Ver
    O365
    Posts
    129

    Re: OR function within an IF formula

    In my own words the formula is saying as follows:

    Key to cell names:
    A1 - Task name
    B1 - Status
    C1 - Due Date
    D1 - Completed Date


    IF A1 is blank OR C1 is less than today's date, RETURN result "", otherwise IF B1 says "Complete" AND D1 is equal to or earler than C1 AND D1 is populated with a date, RETURN "Pass", if not, then RETURN "Fail". So string below:

    =IF(OR([Task Name]24 = "", [Due Date]24 < TODAY(), "", IF(AND(Status24 = "Complete", [Completed date]24 <= [Due Date]24, ISDATE([Completed date]24)), "PASS", "FAIL")))

    Still doesn't work.

  7. #7
    Registered User
    Join Date
    03-17-2011
    Location
    UK
    MS-Off Ver
    Excel 2010, 2007, 2003
    Posts
    11

    Re: OR function within an IF formula

    IF(OR(A1=””, C1<Today()), “”, IF(and(B1=”Complete”, D1<=C1, isdate(D1)), “Pass, “Fail”))

    Using your cell references

    Your current one misses a closed bracket after the OR and tests the following

    If One of
    [task name]is blank
    OR due date is less than today
    OR "blank"
    OR IF All of
    Status24=complete
    AND completed before due
    AND there is a completed date
    Then print pass or fail


    so you have a really long OR but no outputs for your if.
    Last edited by SPACKlick; 10-18-2012 at 10:31 AM.

  8. #8
    Registered User
    Join Date
    09-01-2012
    Location
    Staffordshire, England
    MS-Off Ver
    O365
    Posts
    129

    Re: OR function within an IF formula

    i have put the missing closed bracket in but still get the error message "UNPARSEABLE"

    =IF(OR([Task Name]24=””, [Due Date]24<Today()), “”, IF(and(Status24=”Complete”, [Completed date]24<=[Due Date]24, isdate([Completed date]24)), “Pass, “Fail”))

+ 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