Searching with INDEX(MATCH(
Hello,
I am working on building a portfolio level sheet that can operate as a searching tool within Smarthsheets and I'm looking for a little assistance to create a method to find based on key words rather than exact matches. Is this possible? What would the returns look like if there were multiple values?
Also the below formula is only pulling the parent row, can index match search children as well?
If I use the formula: =INDEX({DJLIPP - TN}, MATCH([Search Value]@row, {DJLIPP - TN}))
DJLIPP - TN being the project plan to search
[Search Value]@row being what project they are searching for
..are any of the above questions achievable?
Best Answer
-
The COLLECT function can sort of work like INDEX, and is especially useful for multiple matches as you mention. The formula below will return all of your values that contain the word "Banana" and separate out multiple matches by using the combination of JOIN and CHAR(10) - line break. Make sure that you wrap text on your formula cell so that multiple matches flow to the next row.
=JOIN(COLLECT([DJLIPP - TN]:[DJLIPP - TN], [DJLIPP - TN]:[DJLIPP - TN], CONTAINS([Search Value]@row, @cell)), CHAR(10))
Jason Tarpinian - Sevan Technology
Smartsheet Aligned Partner
Answers
-
Are you able to provide screenshots for context?
-
The COLLECT function can sort of work like INDEX, and is especially useful for multiple matches as you mention. The formula below will return all of your values that contain the word "Banana" and separate out multiple matches by using the combination of JOIN and CHAR(10) - line break. Make sure that you wrap text on your formula cell so that multiple matches flow to the next row.
=JOIN(COLLECT([DJLIPP - TN]:[DJLIPP - TN], [DJLIPP - TN]:[DJLIPP - TN], CONTAINS([Search Value]@row, @cell)), CHAR(10))
Jason Tarpinian - Sevan Technology
Smartsheet Aligned Partner
-
@Jason Tarpinian This did it! I replaced your []:[] with {} to reference another sheet but it worked overall. Well done and thank you for the assistance.
@Paul Newcome Sorry I usually include those my mistake! Jason's solution did it for me.
Help Article Resources
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
- 495 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!