# How to return multiple matching values in one cell in Excel

Filter the matches and join them: =TEXTJOIN(", ",TRUE,FILTER(results,lookup_range=value)).

**Excel:** `=TEXTJOIN(", ",TRUE,FILTER(B2:B8,A2:A8=E1))` (Excel 2021, 2024 and Microsoft 365)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E |
| --- | --- | --- | --- | --- |
| Team | Member |  | Team | Design |
| Design | Aiko |  | Members |  |
| Sales | Ben |  |  |  |
| Design | Chidi |  |  |  |
| IT | Dana |  |  |  |
| Sales | Eli |  |  |  |
| Design | Fay |  |  |  |
| IT | Gus |  |  |  |

Formula in E2: `=TEXTJOIN(", ",TRUE,FILTER(B2:B8,A2:A8=E1))`

Result: Aiko, Chidi, Fay

## How it works

VLOOKUP and XLOOKUP stop at the first match. FILTER returns all of them as a list, and TEXTJOIN joins that list into one piece of text with ", " between the items. The TRUE skips empty cells.

## Other ways

- `=FILTER(B2:B8,A2:A8=E1)`: Without TEXTJOIN the matches spill down, one per cell. (One name per row instead of one cell.)

## Common mistakes

- If nothing matches, FILTER returns #CALC!. Add a fallback: `FILTER(B2:B8,A2:A8=E1,"")`.
- TEXTJOIN results are limited to 32,767 characters.

## Questions

**How do I list the matches one per line in the cell?**

Use a line break as the separator: `=TEXTJOIN(CHAR(10),TRUE,FILTER(B2:B8,A2:A8=E1))` and turn on Wrap Text.

**How do I remove repeats from the list?**

Wrap the FILTER in UNIQUE: `TEXTJOIN(", ",TRUE,UNIQUE(FILTER(…)))`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-29.

Source: https://spreadsheetpractice.com/formulas/return-multiple-matches-in-one-cell
