Nested IF with CONTAINS
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
-
=IF(CONTAINS("BRZ", Path4), "BRZ", IF(CONTAINS("SIL", Path4), "SIL"
Just some parenthesis issues with your second solution
Answers
-
=IF(CONTAINS("BRZ", Path4), "BRZ", IF(CONTAINS("SIL", Path4), "SIL"
Just some parenthesis issues with your second solution
-
That worked! Thanks so much for the quick answer!!
-
NP glad I could help
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.2K Get Help
- 386 Global Discussions
- 212 Industry Talk
- 444 Announcements
- 4.6K Ideas & Feature Requests
- 141 Brandfolder
- 132 Just for fun
- 131 Community Job Board
- 453 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 291 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!