Excel functions · Text
TEXTSPLIT function in Excel
TEXTSPLIT splits a text string into separate cells at a delimiter you choose, across columns, down rows, or both, such as "Lopez, Maria" into "Lopez" and "Maria". It's a formula version of Text to Columns that updates when the source text changes.
Last reviewed
Syntax
=TEXTSPLIT(text, col_delimiter, [row_delimiter], [ignore_empty], [match_mode], [pad_with])- textrequired
- The text to split.
- col_delimiterrequired
- Where to split across columns, such as ", ". Leave it empty (two commas) to split only down rows.
- row_delimiteroptional
- Where to split down rows, such as ";".
- ignore_emptyoptional
- TRUE skips empty pieces between delimiters that sit next to each other. FALSE (the default) keeps them as empty cells.
- match_modeoptional
- 0 matches the delimiter case-sensitively (the default); 1 ignores case.
- pad_withoptional
- What fills gaps when rows split into different numbers of pieces. Defaults to #N/A.
- The pieces are text. Wrap the formula in VALUE, or put -- in front, to get numbers.
- Give several delimiters as an array: TEXTSPLIT(A2, {",",";"}).
Which versions have TEXTSPLIT
Microsoft 365, Excel for the web, and Excel 2024 (Windows and Mac). Not in Excel 2021 or older.
| Version | Has it |
|---|---|
| Microsoft 365 (Windows and Mac) | Yes |
| Excel for the web | Yes |
| Excel 2024 | Yes |
| Excel 2021 | No |
| Excel 2019 | No |
| Excel 2016 | No |
Google Sheets
Google Sheets has no TEXTSPLIT. Use SPLIT(text, delimiter, [split_by_each], [remove_empty_text]); note that split_by_each defaults to TRUE, so a delimiter like ", " splits at every comma and every space unless you set it to FALSE. SPLIT only splits across columns.
Examples
The examples use this sample sheet.
| Row | A |
|---|---|
| 1 | Text |
| 2 | Lopez, Maria |
| 3 | excel;finance;q4 |
| 4 | North=120;South=95;East=140 |
1.Split across columns
=TEXTSPLIT(A2, ", ")Result: Spills Lopez | Maria across two cells
Lopez Maria The comma and the space after it are the delimiter, so neither is left in the result.
2.Split down rows
=TEXTSPLIT(A3, , ";")Result: Spills excel, finance, q4 down a column
excel finance q4 col_delimiter is left empty, so the text splits only at each semicolon, into rows.
3.Split into a table
=TEXTSPLIT(A4, "=", ";")Result: Spills a 3-row, 2-column table
North 120 South 95 East 140 Semicolons start new rows and equals signs start new columns. The numbers come back as text.
Common errors and fixes
| Error | Why it happens | Fix |
|---|---|---|
| #N/A in some cells | Rows split into different numbers of pieces, and the gaps are padded with #N/A. | Set pad_with, such as "" for blanks. |
| #SPILL! | Cells the pieces need aren't empty. | Clear the cells to the right and below. |
| #NAME? | Your Excel doesn't have TEXTSPLIT (Excel 2021 or older). | Use Microsoft 365, Excel for the web or Excel 2024, or Data > Text to Columns. |
Do it with GPTExcel
Skip writing TEXTSPLIT by hand
Upload your Excel or CSV file to Chat and ask in plain English. GPTExcel writes the formula for your file and your version of Excel or Google Sheets.
Split the Full name column into first and last name columns.
Done. I used TEXTSPLIT on your sheet and checked the results against your data.
- Written for your platform and version
- Checked against your actual data
- Newest functions looked up in official docs
TEXTSPLIT questions
- Which Excel versions have TEXTSPLIT?
- Microsoft 365 (Windows and Mac), Excel for the web, and Excel 2024. Excel 2021 and older don't have it; use Text to Columns or LEFT, MID and FIND there.
- What's the Google Sheets version of TEXTSPLIT?
- SPLIT. =SPLIT(A2, ", ", FALSE) splits "Lopez, Maria" the way TEXTSPLIT does. Without FALSE, Sheets splits at every comma and every space.
Skip the formula hunt
Upload a spreadsheet and ask in plain English. Free plan, no credit card.
Start free