Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
Heads up: Excel and Google Sheets do this differently.
=TEXTJOIN(", ",TRUE,IF(B2:B4=A2,C2:C4,""))=TEXTJOIN(", ",TRUE,FILTER(C2:C4,B2:B4=A2))Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
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.
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.
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.
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: