I have comma delimited data such as OX1024, OX2024, OY2024.
I'd like to split it based on the commas and trim the extra space.
I have comma delimited data such as OX1024, OX2024, OY2024.
I'd like to split it based on the commas and trim the extra space.
Hello yawnzzzz,
Use the Split function. It returns a zero-based, one-dimensional array containing a specified number of substrings.
Syntax
Split(expression[, delimiter[, limit[, compare]]])
The Split function syntax has these named arguments:
Part Description
expression Required. String expression containing substrings and delimiters. If expression is a zero-length string(""), Split returns an empty array, that is, an array with no elements and no data.
delimiter Optional. String character used to identify substring limits. If omitted, the space character (" ") is assumed to be the delimiter. If delimiter is a zero-length string, a single-element array containing the entire expression string is returned.
limit Optional. Number of substrings to be returned; –1 indicates that all substrings are returned.
compare Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. See Settings section for values.
Settings
The compare argument can have the following values:
Sincerely,![]()
Please Login or Register to view this content.
Leith Ross
If I do this:
arr will only contain Two and Three?![]()
Please Login or Register to view this content.
arr(0) = "One"
arr(1) = " Two"
arr(2) = " Three"
Entia non sunt multiplicanda sine necessitate
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks