Google Sheets Guide · Prompt: “Join non-empty tags from columns A, B, and C into a clean comma-separated list”

Split and Reformat Comma-Separated Values in Google Sheets

Verified by LiveFormulaLab Engineering Team • Updated November 2026

Split comma-separated tags or reformat delimited lists cleanly in Google Sheets using SPLIT, TRIM, and TEXTJOIN. Test live in our grid.

Verified Google Sheets Syntax

=TEXTJOIN(", ", TRUE, A2:C2)

How This Formula Works (Step-by-Step)

Exported CRM tags or form checkboxes often arrive scattered across multiple columns or messy comma lists.

Step 1: TEXTJOIN(", ", TRUE, A2:C2) merges values across columns while ignoring blank cells automatically.

Step 2: To go the opposite direction (one cell into rows), wrap SPLIT(A2, ",") inside TRANSPOSE.

Formula Syntax & Arguments Breakdown

Joins multi-column cell values into a clean comma-separated string using TEXTJOIN, or pairs SPLIT with TRANSPOSE to pivot delimited tags into vertical rows.

Argument / ClauseRequirementData TypeRole & Behavior
delimiter (", ")RequiredText SeparatorCharacter sequence placed between every non-empty joined item.
ignore_empty (TRUE)RequiredBooleanSkips blank cells automatically when TRUE so trailing or double commas never appear.
text1 (A2:C2)RequiredCell RangeHorizontal or vertical range of values merged into one formatted label.

3 Real-World Use Cases

  • Consolidating multi-select survey responses into a single clean column.
  • Normalizing keyword lists before importing into Google Ads.
  • Converting comma-separated email recipients into vertical rows.

Cross-Platform Equivalents

Excel
=TEXTJOIN(", ", TRUE, A2:C2)
SQL
SELECT CONCAT_WS(', ', NULLIF(tag1, ''), NULLIF(tag2, ''), NULLIF(tag3, '')) AS combined_tags FROM items;
Python Pandas
df[['Tag 1', 'Tag 2', 'Tag 3']].apply(lambda r: ', '.join([x for x in r if x]), axis=1)

Common Mistakes & Pro Tips

Pitfalls & How to Fix Them

  • Mistake: Setting ignore_empty to FALSE leaves awkward double delimiters like "Excel, , Regex" whenever a middle column is blank.

    Fix: Keep the second argument set to TRUE unless preserving positional blanks is explicitly required.

  • Mistake: Running SPLIT + TRANSPOSE inside an ARRAYFORMULA column fails because SPLIT produces 2D arrays.

    Fix: Flatten multi-row comma lists with =TRANSPOSE(SPLIT(TEXTJOIN(",", TRUE, A2:A10), ",")).

  • Mistake: Whitespace around commas in raw tags ("Excel, SQL") creates duplicate-looking entries after SPLIT.

    Fix: Wrap the split output inside ARRAYFORMULA(TRIM(SPLIT(...))) to strip stray spaces.

Engineering Pro Tips

  • Combine UNIQUE(TRANSPOSE(SPLIT(TEXTJOIN(",", TRUE, A2:A50), ","))) to extract a clean master list of all unique tags across a table.
  • Use CHAR(10) as the delimiter in TEXTJOIN to stack multiple fields vertically inside a single wrapped cell.
  • TEXTJOIN works identically in both Google Sheets and Excel 2019/365.

Frequently Asked Questions

What does the TRUE argument in TEXTJOIN do?
Setting ignore_empty to TRUE skips blank cells so you never get double commas like "SaaS, , AI".
How do I split one comma-separated cell into vertical rows?
Use =TRANSPOSE(TRIM(SPLIT(A2, ","))).
How do I remove duplicate tags when joining?
Wrap the range inside UNIQUE before passing it to TEXTJOIN.

Related Formulas & Guides