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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!