TEXTSPLIT Function

Splits text into columns (and rows) at the delimiters you choose.

Category

Text

Available in

Microsoft 365, Excel 2024

Returns

An array that spills

Taught hands-on in Level 4: Advanced Dynamic Arrays & Logic - Advanced Math & Text module

Overview

TEXTSPLIT is Text to Columns as a formula. Give it text and a delimiter and the pieces spill across the row.

Add a row delimiter and it builds a whole grid. Because it's a formula, the split updates when the source text changes.

Syntax

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

Arguments

ArgumentRequired?What it does
textYesThe text to split.
col_delimiterYesWhere to split into columns, such as ",". Use an array like {",",";"} for several.
row_delimiterOptionalWhere to split into rows.
ignore_emptyOptionalTRUE skips empty pieces from doubled delimiters. Default FALSE.
match_modeOptional1 ignores case when matching delimiters. Default 0 (case-sensitive).
pad_withOptionalWhat to fill gaps with in uneven grids. Default #N/A.

Examples

Example 1 — Splitting an export line

Each line of a Northstar export is name, region and sales separated by commas.

B2fx=TEXTSPLIT(A2, ",")
ABCD
1Raw lineNameRegionSales
2Ana Lopez,West,620Ana LopezWest620
3Ben Cho,East,480Ben ChoEast480
=TEXTSPLIT(A2, ",") Explain

The pieces are text — wrap the formula in VALUE or use -- if you need to add up the sales.

Example 2 — Building a grid

Semicolons separate records and commas separate fields.

B2fx=TEXTSPLIT(A2, ",", ";")
ABC
1RawNameRegion
2Ana,West;Ben,EastAnaWest
3BenEast
=TEXTSPLIT(A2, ",", ";") Explain

Common mistakes

  • #SPILL! Something is in the way of the results. Clear the cells to the right (and below, for row splits).

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.