View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JohnI in Brisbane JohnI in Brisbane is offline
external usenet poster
 
Posts: 28
Default Is there a "replace" or "Substitute" command in Excel's VB?

tanast,

try

sString = Replace(sString, " ", "")

regards,

JohnI

wrote in message
...
Hi,

I was hoping someone could help me with a quick question.

Is there a command something like "substitute" or "replace"?

I basically want a command that will replace all instances of a
particular character with another character... For example, I'd like
to remove all the spaces from the string "hello there world" to make
it "hellothereworld".

Any help would be much appreciated.

Thanks