Nested IF with CONTAINS

Andrea Hoerr
Andrea Hoerr ✭✭
edited 06/04/20 in Formulas and Functions

I'm trying to return a value based on different comparisons of the same string.

Example:

Return SIL, BRZ or GLD if one of those terms are in this string : "[blah1_SIL_L01_C99A] blahserver"

What works: =IF(CONTAINS("SIL", Path4), "SIL")

What doesn't work:

=IF(OR(CONTAINS("BRZ", Path4), "BRZ"), IF(CONTAINS("SIL",Path4), "SIL"))

=IF((CONTAINS("BRZ", Path4), "BRZ"), IF(CONTAINS("SIL", Path4), "SIL"))

Path4 refers to the cell containing the string "[blah1_SIL_L01_C99A] blahserver"

I have thousands of rows to perform this on.

Thanks!

Andrea

Best Answer

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!