Nested IF - Incorrect Argument

Options
loeschb
loeschb
edited 12/09/19 in Smartsheet Basics

Hoping someone may be able to spot my error.  Attempting to return 1 of 5 statuses (Complete, Not Started, Late, Pending, or In Progress).  I think the challenge is with the Pending status, where I am trying to flag a due date within 7 days of today.

=IF([Percentage Complete]1 = 1, "Complete", IF([Due Date]1 < TODAY(), "Late", IF([Start Date]1 > TODAY(), "Not Started", IF(AND([Due Date]1 > TODAY(), TODAY() > [Due Date]1 - 7, "Pending", "In Progress")))))

Thanks!

 

Comments

  • sean59916
    sean59916 ✭✭✭
    Options

    It's almost right - I used the formula:

    =IF([Percentage Complete]1 = 1, "Complete", IF([Due Date]1 < TODAY(), "Late", IF([Start Date]1 > TODAY(), "Not Started", IF([Due Date]1 <= TODAY() + 7, "Pending", "In Progress"))))

    See the screenshot - I hope this helps?

     

    Sean

    2019-05-31_11-54-47.jpg

  • loeschb
    Options

    Excellent.  Thanks, Sean.

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Options

    To add on...

     

    The problem with your original formula is that you did not close your AND statement.

     

    =IF([Percentage Complete]1 = 1, "Complete", IF([Due Date]1 < TODAY(), "Late", IF([Start Date]1 > TODAY(), "Not Started",

     

    IF(

     

    AND([Due Date]1 > TODAY(), TODAY() > [Due Date]1 - 7),

     

    "Pending", "In Progress"))))

    .

    Notice I added a closing parenthesis after the 7 and removed one from the end of the formula.