Multiple IF Statements

I'm hoping someone can help me determine the error in my IF statement. We have tasks in our projects assigned to a specific role: either an SL (Senior Lead), SPL (Senior Project Lead), or a PC (Project Coordinator). I have those initials and the person assigned to those roles at the top of my sheet. I.e.: PL Steve Smith, SPL Lee Jones, PC Aru Ward. The person's name is in the "Action" column in row 1 (PL), 2 (SPL), or 3 (PC). I am trying to create an IF statement that will look at the initials in the "Responsible" column and then fill in that name from the top of the sheet (in the "Action" column) in the "Assigned To" column.

I can get the IF statement to work when I have the person's name fill into the "Assigned To" column, based on one of the role initials. When I try to expand the formula to look for one of the three initial options for the three roles I get a "#UNPARSEABLE" message.

Here is the single IF statement that worked: =IF(Responsible@row = "PL", $Action$1). And here is the multiple IF statement I tried to create for the second initial options "SPL" that did not work: =IF[(Responsible@row = "PL", $Action$1), IF(Responsible@row = "SPL", $Action$2)] . If I can figure out how to get it to work for two options, "PL" or "SPL", then I can add to the formula for the third option "PC". Thank you!


Tags:

Best Answer

  • leslie.g
    leslie.g ✭✭
    edited 08/11/22 Answer ✓

    If you want it to do different actions, you need to provide a "If False" to your IF statement.

    =IF( logical_expression value_if_true [ value_if_false ])

    Therefore, what I would do is the following:

    =IF(Responsible@row = "PL", $Action$1, IF(Responsible@row = "SPL", $Action$2, IF(Responsible@row = "PC", $Action$3, "NA")))

    This should say "If Responsible is PL, return Action 1, if not, check to see if Responsible is SPL, if it is, return Action 3, if not, check to see if Responsible is PC, if it is, return Action 3. If it is none of these, return NA." I think that will work...

Answers

  • leslie.g
    leslie.g ✭✭
    edited 08/11/22 Answer ✓

    If you want it to do different actions, you need to provide a "If False" to your IF statement.

    =IF( logical_expression value_if_true [ value_if_false ])

    Therefore, what I would do is the following:

    =IF(Responsible@row = "PL", $Action$1, IF(Responsible@row = "SPL", $Action$2, IF(Responsible@row = "PC", $Action$3, "NA")))

    This should say "If Responsible is PL, return Action 1, if not, check to see if Responsible is SPL, if it is, return Action 3, if not, check to see if Responsible is PC, if it is, return Action 3. If it is none of these, return NA." I think that will work...

  • Thank you that worked perfectly!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!