TEXTSPLIT Function
TEXTSPLIT separates delimited text into a dynamic row, column, or two-dimensional array. Optional arguments control empty items, case matching, and padding.
| Excel TEXTSPLIT Function | |||||||||||
| TEXTSPLIT separates delimited text into dynamic rows, columns, or a two-dimensional array. | |||||||||||
| Text and delimiters, editable | Dynamic results | ||||||||||
| Text | Column delimiter | Row delimiter | Ignore empty | Example | Formula syntax | Result 1 | Result 2 | Result 3 | |||
| Red,Blue,Green | , | FALSE | Split to columns | =TEXTSPLIT(A12,B12) | Red | Blue | Green | ||||
| North|South|East | | | FALSE | |||||||||
| A=1,B=2,C=3 | = | , | FALSE | ||||||||
| Red,,Green | , | TRUE | |||||||||
| Split to rows | =TEXTSPLIT(A13,,C13) | North | |||||||||
| South | |||||||||||
| East | |||||||||||
| Rows and columns | =TEXTSPLIT(A14,B14,C14) | A | 1 | ||||||||
| B | 2 | ||||||||||
| C | 3 | ||||||||||
| Ignore empty | =TEXTSPLIT(A15,B15,,D15) | Red | Green | ||||||||
| Reliability checks | |||||||||||
| Column splitting returns Red, Blue, and Green | OK | ||||||||||
| ignore_empty removes the empty middle item | OK | ||||||||||
Overview
TEXTSPLIT separates a text string into a dynamic array using column and row delimiters.
Quick reference
Syntax: =TEXTSPLIT(text, col_delimiter, [row_delimiter], [ignore_empty], [match_mode], [pad_with])
Returns: A spilled array of text fragments. (array)
Arguments:
text(required) — Text to split.col_delimiter(optional) — Delimiter that separates output columns; required unless row_delimiter is used.row_delimiter(optional) — Delimiter that separates output rows.ignore_empty(optional) — TRUE removes empty items between consecutive delimiters.match_mode(optional) — 0 is case-sensitive and 1 ignores case.pad_with(optional) — Value used to fill missing elements in an uneven two-dimensional result.
The source text is required, together with at least a column or row delimiter. Optional controls determine empty-item handling, case sensitivity, and padding for uneven two-dimensional results.
Common uses
- Splitting comma-separated text into columns
- Converting delimited text into a vertical list
- Parsing key-value pairs into rows and columns
Calculations
A column delimiter spills pieces across columns. A row delimiter spills pieces down rows. Supplying both creates a two-dimensional array.
By default, consecutive delimiters preserve an empty item. Set ignore_empty to TRUE to remove it. If no delimiter is found, the original text is returned unchanged.
Function behavior
Situation | Behavior |
|---|---|
Column delimiter | Spills pieces horizontally. |
Row delimiter | Spills pieces vertically. |
Both delimiters | Returns a two-dimensional array. |
Consecutive delimiters | Preserve an empty item by default. |
Uneven two-dimensional rows | Use |
Blocked output area | Returns |
Common errors
Putting the delimiter in the wrong argument
What happens: The output spills across instead of down, or down instead of across.
Better approach: Use col_delimiter for columns and row_delimiter for rows.
Blocking the spill range
What happens: Excel returns #SPILL!.
Better approach: Clear the full destination area and enter the formula only in its anchor cell.
Example
Example 1
=TEXTSPLIT(A12,B12)
Red,Blue,Green splits across columns as Red, Blue, and Green.
Example 2
=TEXTSPLIT(A13,,C13)
With the column delimiter omitted and | supplied as the row delimiter, North, South, and East spill down rows.
Example 3
=TEXTSPLIT(A14,B14,C14)
Using = for columns and , for rows converts A=1,B=2,C=3 into a three-row, two-column array.
Example workbook
The workbook demonstrates horizontal, vertical, and two-dimensional splitting, plus an ignore-empty case and two formula-driven checks.
Key takeaway
Choose the delimiter argument by spill direction, and keep the dynamic output area empty.