Alex Campbell
asked on
How to select one item in a cell value separated by characters?
I have a list of cities in this format in each cell:
Baltimore|Maryland|United States
Frederick|Maryland|United States
Chicago|Illinois|United States
I need a custom function to pull out the 2nd one in each cell.
Maryland
Maryland
Illinois
Parsing.xlsx
Baltimore|Maryland|United States
Frederick|Maryland|United States
Chicago|Illinois|United States
I need a custom function to pull out the 2nd one in each cell.
Maryland
Maryland
Illinois
Parsing.xlsx
ASKER
Thank you for the suggestion of the formula.
I would like to see how it would work as a custom function.
That is because I am working on learning how to build custom functions.
I would like to see how it would work as a custom function.
That is because I am working on learning how to build custom functions.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
wonderful. Just what I was looking for
ASKER
I don't see how to ask a related question any more.
How could the function be adapted to pass the character to be used as the separator?
How could the function be adapted to pass the character to be used as the separator?
How could the function be adapted to pass the character to be used as the separator?
try change the 3rd parameter in that function, like:
=SplitString(A1,2, "*")
which means * is the separator
ASKER
Great, thanks!
ASKER
Great, thanks!
=MID(A1,SEARCH("|",A1)+1,S
Or mark the items in column A and use the "Text to columns" function on the Data tab, and use | as delimiter.
Parsing.xlsx