Multiple if statements

I want to change the name of a task depending on the status of an approval request.


IF ([Assigned To approval]8 is either blank or "Submitted" I want the task name to say "Attach Document Here"

IF ([Assigned To approval]8 is accepted, I want the task name to say "Invitation: Review Document"

IF ([Assigned To approval]8 , I want the task name to say "Invitation Declined"

I had this working when i only had two conditions, but cant get it to work with one function for all the above.

=IF([Assigned To approval]8 = "Approved", "Invitation: Document for Review", IF([Assigned To approval]8 = Declined, "Invitation Declined"), IF([Assigned To approval]8 = "Submitted", ="Attach Document Here", IF([Assigned To approval]8 = "", = "Attach Document Here")))

Answers

  • Connor Hartford
    Connor Hartford ✭✭✭✭✭

    Hi Jennifer,

    It looks like you have too many, and not enough closed parentheses.

    Try this:

    =IF([Assigned To approval]8 = "Approved", "Invitation: Document for Review", IF([Assigned To approval]8 = "Declined", "Invitation Declined", IF([Assigned To approval]8 = "Submitted", "Attach Document Here", IF([Assigned To approval]8 = "", ="Attach Document Here"))))

    You can also use this:

    =IF([Assigned To approval]@row = "Approved", "Invitation: Document for Review", IF([Assigned To approval]@row = "Declined", "Invitation Declined", IF([Assigned To approval]@row = "Submitted", "Attach Document Here", IF([Assigned To approval]@row = "", ="Attach Document Here"))))

    Connor


    Connor Hartford

  • I tried the first formula, but when [Assigned To Approval] is blank, it says #UNPARSABLE. The first 3 if condition works - just not the blank one.

  • David Joyeuse
    David Joyeuse ✭✭✭✭✭

    I would rather use this one, as your "attach document here" is triggered when it's either submitted or blank:

    =IF([Assigned To approval]@row = "Approved", "Invitation: Document for Review", IF([Assigned To approval]@row = "Declined", "Invitation Declined","Attach Document Here"))

    If it's approved ==> Document for review.

    If it's not ==> If it's declined ==> Invitation declined.

    ==> Submitted or Blank (or every other case) ==> Attach document here.

    Hope it helped!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!