# Nest IF formula

✭✭✭✭

I have tried looking at the help but it doesn't provide details on creating nested IF formula.

I am trying to say:

If the column has name 1, then return statement A; if the column has name 2 then return statement B, if neither then return statement C. Any tips?

Tags:

• ✭✭✭✭✭✭

Hi @sholmes

I hope you're well and safe!

Try something like this.

```=
IF([Assigned AM/TAM]@row = "Sonya Prear", "Exited", IF([Assigned AM/TAM]@row = "Jonathan Cyrus",
"Transitional", "Stabilized"))
```

Did that work/help?

I hope that helps!

Be safe and have a fantastic weekend!

Best,

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:[email protected] | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

• ✭✭✭✭✭✭

=IF(Column@row = "Name 1", "Statement A", IF(Column@row = "Name 2", "Statement B", "Statement C")

Here, color-coded, you can see that if the first IF statement evaluates to TRUE, it applies "Statement A", but if it evaluates to FALSE, only then does it consider the second IF statement. If the second IF statement evaluates to TRUE, it applies "Statement B", but if it evaluates to FALSE, it applies "Statement C".

Regards,

Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US

If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

• ✭✭✭✭

Thanks, but I still get an error message.

• ✭✭✭✭✭✭

There's not much more I can do to help without more information. The structure I supplied based on what you asked for is 100% correct, as long as it is applied correctly for your given situation. Without specifics on column types, the data involved, etc, I have no way to know if something would need to be adjusted.

Regards,

Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US

If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

• ✭✭✭✭

Hi, so the column is a person's name. I thought I would have to reference the column in brackets but I am not sure. This is how I typed in the sheet where I received an error:

=IF(Assigned AM/TAM@row = “Sonya Prear”, “Exited”, IF(Assigned AM/TAM@row = “Jonathan Cyrus”, “Transitional”, “Stabilized”))

• ✭✭✭✭✭✭

Aha. When there are spaces in your column names, or your column name ends in a number, you do need to put them in straight brackets:

=IF([Assigned AM/TAM]@row = “Sonya Prear”, “Exited”, IF([Assigned AM/TAM]@row = “Jonathan Cyrus”, “Transitional”, “Stabilized”))

These pages and this sheet help big time with functions and formulas:

Functions List | Smartsheet Learning Center

Formula Error Messages | Smartsheet Learning Center

(3) Smartsheet Formula Examples - Smartsheet.com (If you can't access this sheet, send me your smartsheet login email, and I'll share it.)

Regards,

Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US

If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

• ✭✭✭✭

I am still getting an error. Thanks so much, I will try the help screens you provided.

• ✭✭✭✭✭✭

Hi @sholmes

I hope you're well and safe!

Try something like this.

```=
IF([Assigned AM/TAM]@row = "Sonya Prear", "Exited", IF([Assigned AM/TAM]@row = "Jonathan Cyrus",
"Transitional", "Stabilized"))
```

Did that work/help?

I hope that helps!

Be safe and have a fantastic weekend!

Best,

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:[email protected] | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

• ✭✭✭✭✭✭

What is the error message you are seeing?

Are you using this formula in the same sheet that contains the Assigned AM/TAM column? While the syntax and formula structure is similar, if you're trying to reference a column in another sheet there are some other steps to do, which changes some things.

Regards,

Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US

If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

• ✭✭✭✭

I am using this formula in the same sheet.

• ✭✭✭✭

@Andrée Starå Thanks so much, that worked!

• ✭✭✭✭✭✭

Very strange, you and I supplied literally the exact same formula. The only difference is that her font must be using some weird special characters or ext-ascii or something. I just copied the text from her original supplied formula and added the brackets:

=IF([Assigned AM/TAM]@row = “Sonya Prear”, “Exited”, IF([Assigned AM/TAM]@row = “Jonathan Cyrus”, “Transitional”, “Stabilized”))

Notice the difference in the quotation marks between what she supplied above, and what you supplied here:

=IF([Assigned AM/TAM]@row = "Sonya Prear", "Exited", IF([Assigned AM/TAM]@row = "Jonathan Cyrus", "Transitional", "Stabilized"))

The formula content and structure are identical.

Regards,

Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US

If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

• ✭✭✭✭✭✭

Excellent!

You're more than welcome!

@sholmes & @Jeff Reisman The issue was the " ". I suspect that you used Word or similar to write the formula, and then the "" will not be correct.

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:[email protected] | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

• ✭✭✭✭✭✭

“Jeff” - MS WORD 365

"Jeff" - Smartsheet Community page

@Andrée Starå That must have been it!

Regards,

Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US

If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

• ✭✭✭✭

@Andrée Starå Thanks so much, that worked! @Jeff R thanks so much, it must have been a spacing issue.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!