Splits a string into many strings.
string SPLIT(string value, string splitChar)
string SPLIT(string value, string splitChar, int index)
Object | Data Type | Description |
---|---|---|
value | String | The original string to look in. |
splitChar | String | The character that splits the strings. |
index | Integer | The item index to return. |
You have an array of email addresses separated by a "|" but want these separated:
SPLIT("jb@companya.com|js@companyb.com|sc@companyc.com","|")
Will return "jb@companya.com; js@companyb.com; sc@companyc.com".
or
You have an array of products separated by a "|" but only want to return the second product in the list:
SPLIT("DataSync|Ouvvi|Consulting|Support","|",2)
Will return "Ouvvi".
or
This could be used to gather the domain from an email with the combined use of the ARRAYINDEX function:
ARRAYINDEX(SPLIT("support@simego.com","@"),2)
Will return 'simego.com'.
or
This can be used to return the company name from an email address:
SPLIT((SPLIT("support@simego.com,"@",2)), ".", 1)
Will return "simego".