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
- Customer Resources
- 64.6K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 466 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 63 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!