# TEXTSPLIT formula generator

> Describe what you need and get a TEXTSPLIT formula for Excel and Google Sheets, run on real data before you copy it. Plus 8 tested TEXTSPLIT examples.

Source: https://spreadsheetpractice.com/tools/formula-generator/textsplit · Updated October 29, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

TEXTSPLIT splits text into separate cells at a delimiter: across columns, down rows, or both.

Describe the task at [TEXTSPLIT formula generator](https://spreadsheetpractice.com/tools/formula-generator/textsplit) and get a TEXTSPLIT formula for Excel and Google Sheets, tested on real data.

## Tested TEXTSPLIT examples

### Split comma-separated values into rows

`=TEXTSPLIT(A2,,", ")`

Excel. Result on the sample sheet: 5 rows (C2:C6). [See it and try it](https://spreadsheetpractice.com/formulas/split-comma-separated-values-into-rows)

### Sum numbers separated by commas in one cell

`=SUM(--TEXTSPLIT(B2,","))`

Excel. Result on the sample sheet: 5 rows (C2:C6). [See it and try it](https://spreadsheetpractice.com/formulas/sum-numbers-separated-by-commas-in-a-cell)

### Replace line breaks with commas

`=SUBSTITUTE(A2,CHAR(10),", ")`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/replace-line-breaks-with-commas)

### Split text by line break

`=TEXTSPLIT(A2,CHAR(10))`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/split-text-by-line-break)

### Split comma-separated values into one column

`=TEXTSPLIT(TEXTJOIN(", ",TRUE,B2:B6),,", ")`

Excel. Result on the sample sheet: 9 rows (D2:D10). [See it and try it](https://spreadsheetpractice.com/formulas/split-comma-separated-values-into-one-column)

### Sort words in a cell alphabetically

`=TEXTJOIN(", ",TRUE,SORT(TEXTSPLIT(A2,,", ")))`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/sort-words-in-a-cell-alphabetically)

### Fix spacing in comma-separated lists

`=TEXTJOIN(", ",TRUE,TRIM(TEXTSPLIT(A2,",")))`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/fix-spacing-in-comma-separated-lists)

### Remove duplicate values within a cell

`=TEXTJOIN(", ",TRUE,UNIQUE(TEXTSPLIT(A2,,", ")))`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/remove-duplicates-within-a-cell)

## Questions

### What does the TEXTSPLIT formula generator do?

You describe the task in plain English, and it writes the formula, using TEXTSPLIT where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.

### What does TEXTSPLIT do?

TEXTSPLIT splits text into separate cells at a delimiter: across columns, down rows, or both.

### Can I learn to write TEXTSPLIT formulas myself?

Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the TEXTSPLIT function page has a practice exercise.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
