Search a string and return multiple results
Hi experts,
I have a formula that searches a string for a keywords, in a string that may include more than one result. It only returns the first instance found. Is it possible to have it continue searching and return all found keywords? Here is what I have currently…. I am looking at JOIN(COLLECT, but not clear how to structure it…. thanks for any help!
=IF(CONTAINS("A-1", [Issue]@row), "Found A1", IF(CONTAINS("A-2", [Issue]@row), "Found A2", IF(CONTAINS("A-3", [Issue]@row), "Found A3", IF(CONTAINS("A-4", [Issue]@row), "Found A4", IF(CONTAINS("A-5", [Issue]@row), "Found A5", "")))))
which returns one value if found… looking to return, for example… "Found A2", "Found A4" to a multi-value dropdown list.
Answers
-
Hi there,
I believe you could return each IF(CONTAINS()) statement by itself, and add the results together like so:
=IF(CONTAINS("A-1", [Issue]@row), "Found A1","") + CHAR(10) + IF(CONTAINS("A-2", [Issue]@row), "Found A2","") + CHAR(10) + IF(CONTAINS("A-3", [Issue]@row), "Found A3","") + CHAR(10) + IF(CONTAINS("A-4", [Issue]@row), "Found A4","") + CHAR(10) + IF(CONTAINS("A-5", [Issue]@row), "Found A5", "")
CHAR(10) is the same as "new line" so it should separate the results into their own entries in a multi-select column.
Renée Roberge
-
Thanks so much, Renée- this works!
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 494 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives