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 / Clause | Requirement | Data Type | Role & Behavior |
|---|---|---|---|
delimiter (", ") | Required | Text Separator | Character sequence placed between every non-empty joined item. |
ignore_empty (TRUE) | Required | Boolean | Skips blank cells automatically when TRUE so trailing or double commas never appear. |
text1 (A2:C2) | Required | Cell Range | Horizontal 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
- Count Distinct Values with Criteria Using COUNTUNIQUEIFS — Count distinct users, orders, or accounts meeting multiple filter conditions in Google Sheets using COUNTUNIQUEIFS and live examples.
- Join All Matching Values Into One Cell (TEXTJOIN + FILTER) — Concatenate all matching values from a Google Sheets column into one comma-separated cell using TEXTJOIN and FILTER. Test live now.
- Google Sheets SUMIFS Date Range Formula Guide — Sum Google Sheets values between two dates with SUMIFS or QUERY. Copy the verified syntax and test live in our interactive spreadsheet.
- Google Sheets QUERY Group By Month Formula — Use Google Sheets QUERY with GROUP BY to aggregate monthly sales automatically without pivot tables. Includes SQL and Pandas comparisons.