MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Replacing Spaces in a String


Posted by Chris on March 27, 2001 7:04 AM

If I have a number such as 4576 34652 98764, how can I replace the spaces with a dash?


Posted by mseyf on March 27, 2001 7:08 AM

=SUBSTITUTE(A1," ","-")

Posted by Aladin Akyurek on March 27, 2001 7:09 AM

=SUBSTITUTE(A1," ","-") where A1 holds the number with spaces.

Aladin

Posted by Mark W. on March 27, 2001 7:20 AM

It's a photo finish!!! : )