Function · Split and regex
Excel TEXTSPLIT function
The Excel TEXTSPLIT function splits text on a delimiter and spills the pieces. Maya, Jordan, Priya becomes three cells.
Syntax =TEXTSPLIT(text, [col_delimiter], [row_delimiter], [ignore_empty], [match_mode], [pad_with])
=TEXTSPLIT("Maya, Jordan, Priya",", ")Arguments
| Name | Required | What to pass |
|---|---|---|
| text | Required | The text to split. |
| col_delimiter | Optional | The mark that starts a new column. ", " splits on a comma followed by a space. |
| row_delimiter | Optional | The mark that starts a new row. You can pass both. |
| ignore_empty | Optional | TRUE drops empty pieces from a doubled delimiter. FALSE, the default, keeps an empty cell. |
| match_mode | Optional | 0 is case-sensitive. 1 ignores case. |
| pad_with | Optional | What to put in the gaps when a row-and-column split is ragged. The default is #N/A. |
Examples
Three names in one cell
=TEXTSPLIT(A1,", ")Result Maya, Jordan, and Priya in three cells
| A | B | C | |
|---|---|---|---|
| 1 | Maya, Jordan, Priya | ||
| 2 | Maya | Jordan | Priya |
TEXTSPLIT breaks one cell into many. Maya, Jordan, Priya split on a comma plus a space spills Maya, Jordan, and Priya across three columns. The formula lives in the first cell. The other two are the spill, the same idea as TRANSPOSE. Split on the comma only and the second and third names keep a leading space, because the space was not part of the delimiter.
A doubled delimiter, two commas in a row, leaves an empty piece unless ignore_empty is TRUE. TEXTJOIN is the reverse: it builds one cell from many. Excel 2021 does not have TEXTSPLIT. A blocked spill is #SPILL!.