SOLVED

New Contributor

# Copying TEXT from Columns into Cells (Separated by Commas)

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?

 A B C D E Order Title Seller's  Name Seller's  Name Order 1 Tony Stark Tony Stark Order 1, Order 2, Order 11, Order 14, Order 15 Order 2 Tony Stark Bruce Banner Order 3, Order 6 Order 3 Bruce Banner Peter Parker Order 4, Order 7, Order 10 Order 4 Peter Parker Clint Barton Order 5, Order 13 Order 5 Clint Barton Matt Murdock Order 8, Order 12 Order 6 Bruce Banner Steve Rogers Order 9 Order 7 Peter Parker Order 8 Matt Murdock Order 9 Steve Rogers Order 10 Peter Parker Order 11 Tony Stark Order 12 Matt Murdock Order 13 Clint Barton Order 14 Tony Stark Order 15 Tony Stark
3 Replies
best response confirmed by Sergei Baklan (MVP)
Solution

# Re: Copying TEXT from Columns into Cells (Separated by Commas)

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.

# Re: Copying TEXT from Columns into Cells (Separated by Commas)

@Hans Vogelaar

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