Concatenate multiple results from an index match

Djones picture Djones · Apr 11, 2017 · Viewed 9k times · Source

I'm trying to concat multiple results from an index match into one cell. Here is an example data set I'm working with:

enter image description here

My desired results:

enter image description here

As you can see, I'm trying to find all customers where the data is 4/12/2017. I then want to combine them into one string in another cell. I've figured out how to sum up the quantity if the date is the same, but just can't figure out how to concatenate the customer.

Answer

user4039065 picture user4039065 · Apr 11, 2017

Use the newer TEXTJOIN function as an array formula with CSE.

=textjoin("|", true, if(a2:a10=date(2017, 4, 12), c2:c10, text(,)))

If your Excel version does not support TEXTJOIN, search this site for [excel][textjoin] for alternatives. Example: TEXTJOIN for xl2010/xl2013 with criteria

enter image description here