FormulaCraft

How to return multiple matches in one cell in Excel and Google Sheets

Heads up: Excel and Google Sheets do this differently.

Excel
=TEXTJOIN(", ",TRUE,IF(B2:B4=A2,C2:C4,""))
Google Sheets
=TEXTJOIN(", ",TRUE,FILTER(C2:C4,B2:B4=A2))

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Set up your data with a lookup column (B), a value column (C), and the search key in A2.
  2. 2In Excel 365, enter as an array formula: =TEXTJOIN(", ",TRUE,IF(B2:B100=A2,C2:C100,"")) — press Ctrl+Shift+Enter in older Excel, or just Enter in Excel 365.
  3. 3In Google Sheets, use =TEXTJOIN(", ",TRUE,FILTER(C2:C100,B2:B100=A2)) — FILTER extracts the matches and TEXTJOIN joins them.
  4. 4The second argument TRUE in TEXTJOIN tells it to skip empty strings, so only actual matches appear in the result.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

Does TEXTJOIN work in older Excel versions?

TEXTJOIN was introduced in Excel 2019 and Excel 365. In Excel 2016 or earlier, you need a VBA function or a complex nested CONCATENATE approach.

How do I return matches from multiple conditions?

In Google Sheets: =TEXTJOIN(", ",TRUE,FILTER(C2:C100,(B2:B100=A2)*(D2:D100=A3))). In Excel 365: use nested IF with AND logic inside TEXTJOIN.

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: