Calc TEXTSPLIT function

The TEXTSPLIT function splits a text string into an array of substrings based on specified delimiters, and selects the fragment at the given index.

Help CentreFunctions & Formulas

For a full list of available calculation functions, please read What calculation functions are supported.


Description

The TEXTSPLIT function splits a text string into an array of substrings based on specified delimiters, and selects the fragment at the given index.


Syntax

TEXTSPLIT(text, delimiter, [instance_num], [match_mode], [match_end])


The TEXTSPLIT function syntax has the following arguments:

  • text: Required. The text string to split.
  • delimiter: Required. The character or characters that separate the substrings.
  • instance_num: Optional. Specifies which occurrence of the delimiter to use. If omitted, the first occurrence is used.
  • match_mode: Optional. Specifies whether to match case-sensitive or case-insensitive. Default is case-insensitive.
  • match_end: Optional. If TRUE, returns text up to the end of the string; if FALSE, returns text up to the next delimiter.

Example

FormulaDescriptionResult
=TEXTSPLIT("apple, banana, cherry", ", ")Splits the text into an array of substrings using comma and space as delimiters.{"apple", "banana", "cherry"}

Errors

For a full list of formula errors, please read Formula errors.


Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.