Multi-Select formula using the selections as the criteria.
See attached document for details, but I need to select email addresses from an external sheet where the contents of a multi-select column is used as the criteria.
This was my attempt. No errors, but it doesn't return anything.
=JOIN(COLLECT({Email Address}, {Dealer Name}, HAS(@cell, DEALER@row)), CHAR(10))
Best Answer
-
UPDATE: Using either CONTAINS or HAS works with only one value selected in the drop down, but when selecting more than one it doesn't return anything.
Answers
-
UPDATE: Using either CONTAINS or HAS works with only one value selected in the drop down, but when selecting more than one it doesn't return anything.
-
Multi-select columns can be tricky because they store multiple values in a single cell, separated by commas, which complicates the usage of functions like
HAS()
orCONTAINS()
for matching multiple criteria at once.Here’s how you can approach solving this issue:
When you use
HAS(@cell, DEALER@row)
orCONTAINS(@cell, DEALER@row)
, these functions are designed to work with single values. In the case of a multi-select column, if a user selects more than one value, these functions attempt to match the entire string (e.g., "Dealer1, Dealer2") against each entry, which usually doesn't produce the intended results unless the exact combination is matched.- Use a Helper Column: A practical way to handle this is to use a helper column in your Smartsheet where you transform the multi-select values into a format that can be more easily manipulated with formulas. For example, you can create a formula in each row of the helper column that checks for each potential dealer value and outputs something more manageable (like a binary flag or simplified string).
- Adjust the Formula: Once you have the helper column set up, you can adjust your
COLLECT
formula to check against this helper column instead of the multi-select column directly.
Here's a step-by-step on how to implement this:
Let’s say your multi-select column is
{Dealer Name}
, and your dealers are "Dealer1", "Dealer2", "Dealer3", etc. You can set up a helper column with a formula like:=IF(CONTAINS("Dealer1", {Dealer Name}), "1", "") +
IF(CONTAINS("Dealer2", {Dealer Name}), "1", "") +
...This formula will output a string of 1’s and 0’s for each dealer.
You can then use this helper column to filter your
COLLECT
formula:=JOIN(COLLECT({Email Address}, {Helper Column}, "some_condition"), CHAR(10))
Replace
"some_condition"
with a specific condition that matches your needs (e.g., checking if a particular dealer's flag is set).bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!