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.

Microsoft 365 and Excel 2024, including Excel for the web. Also in Google Sheets. Excel 2021 and earlier do not have it.

Syntax =TEXTSPLIT(text, [col_delimiter], [row_delimiter], [ignore_empty], [match_mode], [pad_with])

TEXTSPLIT
=TEXTSPLIT("Maya, Jordan, Priya",", ")

Arguments

NameRequiredWhat to pass
textRequiredThe text to split.
col_delimiterOptionalThe mark that starts a new column. ", " splits on a comma followed by a space.
row_delimiterOptionalThe mark that starts a new row. You can pass both.
ignore_emptyOptionalTRUE drops empty pieces from a doubled delimiter. FALSE, the default, keeps an empty cell.
match_modeOptional0 is case-sensitive. 1 ignores case.
pad_withOptionalWhat 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

=TEXTSPLIT(A1,", ")A2
Names
ABC
1Maya, Jordan, Priya
2MayaJordanPriya
A picture of the sheet, not a live calculator. A2 holds the formula. B2 and C2 are the spill.

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!.