Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
P.M.SANJAY
 
Posts: n/a
Default how to remove spaces in a cell/column

hi
I want to remove spaces in a middle of a cell/column.

regards

P.M.SANJAY
  #2   Report Post  
Posted to microsoft.public.excel.misc
George Nicholson
 
Posts: n/a
Default how to remove spaces in a cell/column

Do you need something other than the SUBSTITUTE (and/or REPLACE) functions?

--
George Nicholson

Remove 'Junk' from return address.


"P.M.SANJAY" wrote in message
...
hi
I want to remove spaces in a middle of a cell/column.

regards

P.M.SANJAY



  #3   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme
 
Posts: n/a
Default how to remove spaces in a cell/column

Give us an example of what is in the cell
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"P.M.SANJAY" wrote in message
...
hi
I want to remove spaces in a middle of a cell/column.

regards

P.M.SANJAY



  #4   Report Post  
Posted to microsoft.public.excel.misc
Carole O
 
Posts: n/a
Default how to remove spaces in a cell/column

Here is VBA code from David McRitchie that works for me. Copy starting with
Sub,open your spreadsheet, right click on the tab at the bottom, select View
Code, paste the VBA code, and close out of VBA (file, close and return..).
Highlight the columns that need the spaces removed, go to Tools, Macro,
Macros, Run and select the RemoveAllSpaces, and select Run. That should do
it!!

Good luck!
Carole O

Sub RemoveAllSpaces()
'David McRitchie 2000-10-24
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Selection.SpecialCells(xlConstants).Replace What:=Chr(160), _
Replacement:="", _
LookAt:=xlPart, SearchOrder:=xlByColumns, MatchCase:=True
Selection.SpecialCells(xlConstants).Replace What:=Chr(32), _
Replacement:="", _
LookAt:=xlPart, SearchOrder:=xlByColumns, MatchCase:=True
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub



"P.M.SANJAY" wrote:

hi
I want to remove spaces in a middle of a cell/column.

regards

P.M.SANJAY

  #5   Report Post  
Posted to microsoft.public.excel.misc
wjohnson
 
Posts: n/a
Default how to remove spaces in a cell/column


Select your Column or Columns:
Go To EDIT - REPLACE - in the FIND - press the space bar 1 time.
Leave the REPLACE blank.


--
wjohnson
------------------------------------------------------------------------
wjohnson's Profile: http://www.excelforum.com/member.php...o&userid=29640
View this thread: http://www.excelforum.com/showthread...hreadid=498789



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
How do I remove spaces lovebaby Excel Discussion (Misc queries) 5 October 29th 05 02:08 PM
Remove spaces between words Heather Tavitian Excel Discussion (Misc queries) 2 October 1st 05 01:47 AM
how do I remove empty spaces trailing a text string? Need_Help Excel Worksheet Functions 2 June 7th 05 12:13 AM
How do you remove excess spaces from an Excel field? sarah_jane Excel Discussion (Misc queries) 1 June 1st 05 08:15 AM
remove spaces in text in excel GnarlyCar Excel Discussion (Misc queries) 3 February 1st 05 05:02 PM


All times are GMT +1. The time now is 02:49 PM.

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"