hi
I want to remove spaces in a middle of a cell/column.
regards
P.M.SANJAY
Do you need something other than the SUBSTITUTE (and/or REPLACE) functions?
--
George Nicholson
Remove 'Junk' from return address.quot;P.M.SANJAYquot; gt; wrote in message
...
gt; hi
gt; I want to remove spaces in a middle of a cell/column.
gt;
gt; regards
gt;
gt; P.M.SANJAY
Give us an example of what is in the cell
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email
quot;P.M.SANJAYquot; gt; wrote in message
...
gt; hi
gt; I want to remove spaces in a middle of a cell/column.
gt;
gt; regards
gt;
gt; P.M.SANJAY
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:=quot;quot;, _
LookAt:=xlPart, SearchOrder:=xlByColumns, MatchCase:=True
Selection.SpecialCells(xlConstants).Replace What:=Chr(32), _
Replacement:=quot;quot;, _
LookAt:=xlPart, SearchOrder:=xlByColumns, MatchCase:=True
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
quot;P.M.SANJAYquot; wrote:
gt; hi
gt; I want to remove spaces in a middle of a cell/column.
gt;
gt; regards
gt;
gt; P.M.SANJAY
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: www.excelforum.com/member.php...oamp;userid=29640
View this thread: www.excelforum.com/showthread...hreadid=498789
- May 27 Tue 2008 20:44
how to remove spaces in a cell/column
close
全站熱搜
留言列表
發表留言
留言列表

