Google Sheets Guide · Prompt: “Join all Account names in A2:A6 where Priority in B2:B6 equals "High"”

Join All Matching Values Into One Cell (TEXTJOIN + FILTER)

Verified by LiveFormulaLab Engineering Team • Updated November 2026

Concatenate all matching values from a Google Sheets column into one comma-separated cell using TEXTJOIN and FILTER. Test live now.

Verified Google Sheets Syntax

=TEXTJOIN(", ", TRUE, FILTER(A2:A6, B2:B6="High"))

How This Formula Works (Step-by-Step)

Combining TEXTJOIN with FILTER lets you roll up multiple matching rows into a single comma-separated summary list.

Step 1: FILTER(A2:A6, B2:B6="High") isolates only the High-priority accounts.

Step 2: TEXTJOIN(", ", TRUE, ...) stitches the filtered array into one readable string.

Formula Syntax & Arguments Breakdown

Nests FILTER inside TEXTJOIN so only rows passing one or more logical criteria are concatenated into a clean comma-separated summary string.

Argument / ClauseRequirementData TypeRole & Behavior
delimiter (", ")RequiredText SeparatorSeparator placed between each filtered item (for example ", " or " | ").
ignore_empty (TRUE)RequiredBooleanPrevents blank values inside A2:A6 from creating extra trailing separators.
text_array (FILTER(A2:A6, B2:B6="High"))RequiredFiltered ArrayReturns only items from A2:A6 whose matching priority in B2:B6 equals "High".

3 Real-World Use Cases

  • Listing all overdue invoice IDs for a customer inside one summary row.
  • Combining assigned team members per project into a single cell.
  • Generating comma-separated SKUs included in an order bundle.

Cross-Platform Equivalents

Excel
=TEXTJOIN(", ", TRUE, FILTER(A2:A6, B2:B6="High"))
SQL
SELECT STRING_AGG(account, ', ') AS high_priority_accounts FROM accounts WHERE priority = 'High';
Python Pandas
', '.join(df[df['Priority'] == 'High']['Account'].tolist())

Common Mistakes & Pro Tips

Pitfalls & How to Fix Them

  • Mistake: When zero rows match the FILTER condition, FILTER returns #N/A and breaks TEXTJOIN.

    Fix: Wrap the expression in =IFERROR(TEXTJOIN(", ", TRUE, FILTER(A2:A6, B2:B6="High")), "None") for clean fallback text.

  • Mistake: Adding duplicate names in A2:A6 repeats the same person multiple times in the joined string.

    Fix: Wrap FILTER inside UNIQUE(...) before passing it to TEXTJOIN: TEXTJOIN(", ", TRUE, UNIQUE(FILTER(...))).

  • Mistake: Exceeding Google Sheets’ 50,000-character cell limit on giant tables causes #VALUE!.

    Fix: Filter down to active items or slice top N rows with ARRAY_CONSTRAIN before joining.

Engineering Pro Tips

  • Wrap FILTER inside SORT(...) so concatenated names or tags always render in alphabetical order.
  • To apply multiple OR conditions inside FILTER, add boolean checks with "+": FILTER(A2:A6, (B2:B6="High")+(B2:B6="Critical")).
  • Pass CHAR(10) as the delimiter when generating bulleted multi-line summaries inside a single table cell.

Frequently Asked Questions

What if FILTER finds zero matches?
Wrap the formula in IFERROR(..., "None") so #N/A never appears in your dashboard.
Can I put each matched item on a new line instead of a comma?
Yes! Replace ", " with CHAR(10) and enable Text Wrapping on the cell.
Does this same syntax work in Excel 365?
Yes, TEXTJOIN + FILTER works identically in Excel 365 and Google Sheets.

Related Formulas & Guides