Skip to main content
Version: Streamsheets 3.0

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

NameTypeDescription
TextStringText to split.
SeparatorStringSeparator used to split text.
Index (optional)NumberNumber which specifies the part to return.

Default value: 1

Return

TypeDescription
StringThe 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.