Contains function
I am having trouble with a formula that contains multiple "If(contains)" function. The following returns unparsable.
=IF(CONTAINS("52", [Account #]@row), "52", IF(CONTAINS("53", [Account #]@row), "53", IF(CONTAINS(“54”, [Account #]@row)”54”, "")))
Best Answers
-
Could you share a screenshot of the sheet?
Amber Eakin, MSLS, M.Ed.
Adult Education Specialist | Process Improvement Enthusiast
-
This is so strange. How about this? It looks the same to me, but my sheet is accepting it.
=IF(CONTAINS("52", [Account #]@row), "52", IF(CONTAINS("53", [Account #]@row), "53", IF(CONTAINS("54", [Account #]@row), "54")))
Amber Eakin, MSLS, M.Ed.
Adult Education Specialist | Process Improvement Enthusiast
Answers
-
Hello, @M Scrog - It looks like a syntax error. Does this work?
=IF(CONTAINS("52", [Account #]@row), "52", IF(CONTAINS("53", [Account #]@row), "53", IF(CONTAINS(“54”, [Account #]@row), "54")))
Amber Eakin, MSLS, M.Ed.
Adult Education Specialist | Process Improvement Enthusiast
-
Thank you @Amber Eakin - I am still receiving an "unparseable" error.
-
Could you share a screenshot of the sheet?
Amber Eakin, MSLS, M.Ed.
Adult Education Specialist | Process Improvement Enthusiast
-
This is so strange. How about this? It looks the same to me, but my sheet is accepting it.
=IF(CONTAINS("52", [Account #]@row), "52", IF(CONTAINS("53", [Account #]@row), "53", IF(CONTAINS("54", [Account #]@row), "54")))
Amber Eakin, MSLS, M.Ed.
Adult Education Specialist | Process Improvement Enthusiast
-
@Amber Eakin Thank you! That did it. I think there were some spacing issues based on my comparison.
-
Hi @M Scrog, if you just want the first two digits, you could do this instead:
=LEFT([Account #]@row, 2)
If you want the Series to be a number (right now your computer thinks it's a word) wrap my function in a value function like this:
=VALUE(LEFT[Account #]@row, 2))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 138 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!