SPLIT with multiple delimiters? (general VBA question)

  • Thread starter Thread starter Maury Markowitz
  • Start date Start date
M

Maury Markowitz

Is there an analog of SPLIT that allows you to select more than one
delimiter? I often get text files that have both commas and semis in
them.

Maury
 
Replace the Semi's with Comma's and then have at it.

YourString= Replace(YourString,";",",")
YourArray = split( YourString,",")

Rdub
 
Maury said:
Is there an analog of SPLIT that allows you to select more than one
delimiter? I often get text files that have both commas and semis in
them.

Maury
Not even in Pick Basic, but you can use Replace (a weak version of a Pick
function) and change the semi to a coma.
Just make sure that these always function as the same kind of delimiter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top