Forum Discussion

JMcDonald5150's avatar
JMcDonald5150
Copper Contributor
May 06, 2024
Solved

How to Return Multiple Results as Comma Seperated Values

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)),"")

 

 

Thanks! 

  • 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 Reply

  • JMcDonald5150 

    In B2:

     

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

     

    or

     

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

Resources