Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default trimming a space in the middle of a string

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default trimming a space in the middle of a string

Try

=SUBSTITUTE(A1,CHAR(32),)

If this post helps click Yes
---------------
Jacob Skaria


"thomas donino" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default trimming a space in the middle of a string

VBA solution

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

If this post helps click Yes
---------------
Jacob Skaria


"thomas donino" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default trimming a space in the middle of a string

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)

"thomas donino" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default trimming a space in the middle of a string

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

On Wed, 26 Aug 2009 01:13:10 -0700, thomas donino
wrote:

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a character to the middle of a text string Glynn Taylor Excel Discussion (Misc queries) 3 April 3rd 23 02:38 PM
Forcing a line feed in the middle of a string dhstein Excel Discussion (Misc queries) 3 July 19th 09 10:57 PM
How to extract text from middle of a string Makelei Excel Worksheet Functions 18 July 9th 08 09:03 PM
extract " " space from middle of a string Rasoul Khoshravan Excel Worksheet Functions 5 October 11th 06 12:50 PM
How do I remove a space from the middle of a line of numbers? Raich Excel Discussion (Misc queries) 2 September 12th 06 07:10 PM


All times are GMT +1. The time now is 01:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"