trimming a space in the middle of a string

T

thomas donino

I have a list of names in one column. I want to trim the space from the
middle so that Jim Jones looks like JimJones. Any help?

Thank You
 
J

Jacob Skaria

VBA solution

Msgbox Replace("Jim Jones",chr(32),"")

If this post helps click Yes
 
S

Sam Wilson

Highlight the column and press Ctrl + H for find & replace - replace " " with
"" (you don't need to type the quotation marks, they're just so you can see
what I've typed)
 
G

Gord Dibben

Since you posted in programming group.

Public Sub Strip_WhiteSpace()
Selection.Replace what:=" ", _
replacement:="", lookat:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
End Sub


Gord Dibben MS Excel MVP
 

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

Top