I am iterating through a spreadsheet column that generally has a first and last name that I am trying to split into two columns.
Generally it works like a charm until I get to a cell that has “Steve/Suzie” with no space or last name.
Assign: strLastName = Split(strFirstName," ")(1)
I am reading the strFirstName string then splitting it into the strLastName with the above statement.
My problem is, when I have “Steve/Suzie” in the strFirstName field, the above statement doesn’t work because it is looking for what is AFTER the first space. In the “Steve/Suzie” cases, there is no space and I get the outside the bounds of the array error.
Essentially, I am trying to work around it by reading the string, if there’s no space, then move on. Or if there is no space the strLastName = “”
Any help or suggestions would be greatly appreciated.
Happy New Year!