SOLVED

Copying TEXT from Columns into Cells (Separated by Commas)

New Contributor

Hi there,

I'm looking for the easiest way to fill-in column e with the text in column a (separated by commas) IF they equal the value in column B. See screenshot for visual. Is there a formula that I can use for this?

 

ABCDE
Order TitleSeller's  Name Seller's  Name 
Order 1 Tony Stark Tony StarkOrder 1, Order 2, Order 11, Order 14, Order 15
Order 2Tony Stark Bruce BannerOrder 3, Order 6
Order 3Bruce Banner Peter ParkerOrder 4, Order 7, Order 10
Order 4Peter Parker Clint BartonOrder 5, Order 13
Order 5Clint Barton Matt MurdockOrder 8, Order 12
Order 6Bruce Banner Steve RogersOrder 9
Order 7Peter Parker   
Order 8Matt Murdock   
Order 9Steve Rogers   
Order 10Peter Parker   
Order 11Tony Stark   
Order 12Matt Murdock   
Order 13Clint Barton   
Order 14Tony Stark   
Order 15Tony Stark   
3 Replies
best response confirmed by Sergei Baklan (MVP)
Solution

@CodyC1015 

If you have Office 2021 or Microsoft 365, in E2:

 

=TEXTJOIN(", ",TRUE,FILTER($A$2:$A$16,$B$2:$B$16=D2))

 

If you have Office 2019, in E2 confirmed with Ctrl+Shift+Enter:

 

=TEXTJOIN(", ",TRUE,IF($B$2:$B$16=D2,$A$2:$A$16,""))

 

These can be filled down from E2.

@Hans Vogelaar

THANK YOU very much! That's exactly what I was looking for! It worked perfectly.