Divides text around a specified character or string, and puts each fragment into a separate cell in the row.
Examples
Sample Usage
SPLIT("1,2,3", ",")
SPLIT("Alas, poor Yorick"," ")
SPLIT(A1, ",")
Syntax
SPLIT(text, delimiter, [split_by_each], [remove_empty_text])
-
text
- The text to divide. -
delimiter
- The character or characters to use to splittext
.- By default, each character in
delimiter
is considered individually, e.g. ifdelimiter
is"the"
, thentext
is divided around the characters"t"
,"h"
, and"e"
. Setsplit_by_each
toFALSE
to turn off this behavior.
- By default, each character in
-
split_by_each
- [ OPTIONAL -TRUE
by default ] - Whether or not to dividetext
around each character contained indelimiter
. -
remove_empty_text
- [ OPTIONAL -TRUE
by default ] - Whether or not to remove empty text messages from the split results. The default behavior is to treat consecutive delimiters as one (ifTRUE
). IfFALSE
, empty cells values are added between consecutive delimiters.
Notes
- Note that the character or characters to split the string around will not be contained in the result themselves.
See Also
CONCATENATE
: Appends strings to one another.