Skip to main content
Version: Streamsheets 2.5

SPLIT

Splits a given text by using a specified separator and returns the part at given optional index. If the text does not contain the specified separator, the complete text is returned.The index parameter is optional. If not specified, the first part is returned. The Separator splits a text in parts. 1 returns the first part, 2 the second part, 3 the third and so on.

Syntax

=SPLIT(Text, Separator, [Index])

Arguments

NameDescription
TextText to split.
SeparatorSeparator used to split text.
Index (optional)Number which specifies the part to return. Defaults to 1.

Return

The part of text at specified index.

Examples

FormulaResultComment
=SPLIT("cedalo/topic", "/", 2)
topicReturns the second part of split text.
=SPLIT("cedalo/topic", "/")
cedaloNo index is given so first part is returned by default.
=SPLIT("cedalo/test/topic", "/", 5)
topicIndex exceeds number of parts, so return last one.
=SPLIT("cedalo/test/topic", "+", 2)
cedalo/test/topicSeparator is not contained within text, so return complete Text.