All matches in one cell
Hi - Dave here.
Happy Friday!
How can you get all matches (not just the first match) in one cell?
That's a job for TEXTJOIN, Excel's most powerful function for concatenation (a fancy word for joining text together).
While functions like FILTER and UNIQUE spill a list into separate cells, TEXTJOIN does the opposite: it joins a list into one cell, with a delimiter of your choice.
What's cool is that you can combine FILTER and TEXTJOIN in one formula. You can see how this works below, where the goal is to list the members of each team in a single cell. The formula in G5, copied down, is:
Download the workbook and read the full explanation here
I just updated our TEXTJOIN page with 10 worked examples, including product codes, unique values in one cell, and one row per group with GROUPBY. It also covers a couple of gotchas with dates and line breaks that cause a lot of confusion.
Note: TEXTJOIN requires Excel 2019 or later, and FILTER requires Excel 2021 or later.
Help keep Exceljet going
The internet as we know it is getting crushed by AI. Many websites have lost over half their traffic and are struggling to survive. Exceljet is still at it, publishing new content each week. If you find Exceljet helpful, you can support the site and go ad-free with the Exceljet Lifetime Pass. One payment, no subscription, and ads are gone forever. Plus, you get our Excel Shortcuts video course, free.
Excel formulas
We maintain a list of over 1000 working formulas here.
If you need more structure, we also offer video training.
Have a great weekend!
Dave
The Exceljet newsletter is free and sent weekly on Fridays. Each week, I take a detailed look at a specific Excel formula or function. Sign up on our home page.