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
Name | Description |
---|---|
Text | Text to split. |
Separator | Separator 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
Formula | Result | Comment |
---|---|---|
| topic | Returns the second part of split text. |
| cedalo | No index is given so first part is returned by default. |
| topic | Index exceeds number of parts, so return last one. |
| cedalo/test/topic | Separator is not contained within text, so return complete Text. |