1. Home
  2. Functions
  3. Text
  4. TEXTSPLIT

TEXTSPLIT function

Splits text into columns and rows at the delimiters you give.

Syntax

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

Arguments

ArgumentRequiredDescription
textRequiredThe text to split
col_delimiterRequiredWhere to split into columns (an array gives several delimiters)
row_delimiterOptionalWhere to split into rows
ignore_emptyOptionalTRUE to skip empty values between consecutive delimiters
match_modeOptional0 match case (default), 1 ignore case
pad_withOptionalValue to fill short rows with (#N/A when left out)

How to use TEXTSPLIT

When TEXTSPLIT returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.

TEXTSPLIT takes 2 required arguments and 4 optional arguments. Type =TEXTSPLIT( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=TEXTSPLIT("Dakota Lennon Sanchez", " ")Result 1 by 3 array
Spilled result
ABC
1DakotaLennonSanchez
=TEXTSPLIT("1,2;3,4", ",", ";")Result 2 by 2 array
Spilled result
AB
112
234
=TEXTSPLIT("a,,b", ",", , TRUE)Result 1 by 2 array
Spilled result
AB
1ab

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.