SOLVED

How to Return Multiple Results as Comma Seperated Values

Copper Contributor

What formula(s) should I use instead of INDEX and MATCH to return multiple values? In the attached example, I would like Column B to list multiple results as a comma-separated list. Using row 2 as an example, I would like to see Product 1, Product 3, Product 5 as the returned results. 

 

The formula I used in the example below is:

 

=IFERROR(INDEX($C$1:$L$1,,MATCH("Yes",$C2:$L2,0)),"")

 

JMcDonald5150_0-1715010432100.png

 

Thanks! 

1 Reply
best response confirmed by JMcDonald5150 (Copper Contributor)
Solution

@JMcDonald5150 

In B2:

 

=TEXTJOIN(", ", TRUE, FILTER($C$1:$L$1, C2:L2="Yes", ""))

 

or

 

=TEXTJOIN(", ", TRUE, IF(C2:L2="Yes", $C$1:$L$1, ""))

1 best response

Accepted Solutions
best response confirmed by JMcDonald5150 (Copper Contributor)
Solution

@JMcDonald5150 

In B2:

 

=TEXTJOIN(", ", TRUE, FILTER($C$1:$L$1, C2:L2="Yes", ""))

 

or

 

=TEXTJOIN(", ", TRUE, IF(C2:L2="Yes", $C$1:$L$1, ""))

View solution in original post