Remove blank spaces in an address

G

Gordon Forbes

Hi there,

is there a way to delete a blank spaces from an address

i.e. 124 High Street

would then be 124HighStreet

I've played around with LEFT and RIGHT functions and & " "
but can't quite get it.

Any help would be appreciated.
 
D

Don Guillett

A macro to do a bunch

Sub trimit()
With Selection .Formula = Application.Substitute(.Formula, " ", "")
End With
End Sub
 
K

kkknie

Try:

=SUBSTITUTE(A1," ","")

Where the first set of double quotes are around a blank space and th
second set are right next to each other.

If you want to save the new text, you will have to copy it, and Past
Special | Values or it will remain a formula.
 
G

Gordon Forbes

Excellent, thanks to all who suggested the SUBSTITUTE
function.

Regards
Gordon
 
Top