Making "examp le" become "examp_le" in a string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there and easy way to find and replace the " " in the example above to
"_"? . If not I will have to loop throught each character in the string
using the left and right functions and then recompile the string.
 
Thanks. I'll be using Applicaiton.WorksheetFunction.Substitute(variable," "_")
 
See if your version of Excel supports the Replace VBA function. I think it was
introduced in v 2000. If it does, I would use that instead.
 

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