Search multiple columns for data and if matched, return a value from another column on another sheet
I have been working on a variety of index/match; index/collect formulas to solve this problem with no luck as of yet:
Spreadsheet 1 - 1 Column has a list of business names, then there are 4 award columns that represent the name of the sport they are sponsoring + the city the sport is in.
Spreadsheet 2 - Has a list of sports from all the possible markets. I've created a helper column that takes name of the award + market. So this column should match (if there is a sponsor) to one of the 4 columns in the previous sheet.
To avoid forgetting to add the sponsor attribution on the nominee list, I need a formula that searches all possible sponsor names, looks at the 4 columns and then if it matches the sport + market name on the other sheet, it inputs the business name on the second sheet.
I've gotten this formula to work, but it only searches one of the 4 award columns (so doesn't pick up other awards the sponsor may be associated with).
I've spent days on this formula, so any help is soooo appreciated.
Answers
-
Hi @ccosta
The way I would do this is to write one INDEX(COLLECT per-column. This means you'll have 4 separate formulas to bring back the 4 possible values.
In my sheet I would add this formula into a multi-select cell and use CHAR(10) to create a line break, so that if there's more than one brought back you can visually see them as different values.
For example:
=INDEX(COLLECT()) + CHAR(10) + INDEX(COLLECT()) + CHAR(10)... etc
So, a formula like this:
=IFERROR(INDEX(COLLECT({Column 1 to bring back}, {Range 6}, Market@row, {Range 7}, [Award Name and Market Helper]@row), 1), "") + CHAR(10) + IFERROR(INDEX(COLLECT({Column 2 to bring back}, {Range 6}, Market@row, {Range 7}, [Award Name and Market Helper]@row), 1), "") + CHAR(10) + IFERROR(INDEX(COLLECT({Column 3 to bring back}, {Range 6}, Market@row, {Range 7}, [Award Name and Market Helper]@row), 1), "") + CHAR(10) + IFERROR(INDEX(COLLECT({Column 4 to bring back}, {Range 6}, Market@row, {Range 7}, [Award Name and Market Helper]@row), 1), "")
Let me know if that makes sense and will achieve your end goal!
Cheers,
Genevieve
Join us at Smartsheet ENGAGE 2024 🎉
October 8 - 10, Seattle, WA | Register now -
Have you investigated using JOIN with your COLLECT ?
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.9K Get Help
- 379 Global Discussions
- 210 Industry Talk
- 441 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 300 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!