Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default how do i delete spaces in multiple cells thoughout the workbook?

I have a list of 1,400 names, most of which have 2 spaces preceding the name.
i would like to remove all the space. I read to put 2 spaces in the FIND &
the following in REPLACE WITH: =--substitute(a1,char(160),"") but that
didn't work possibly because it was posted in 2007.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default how do i delete spaces in multiple cells thoughout the workbook?

Find: press space bar twice
Replace with: <leave it blank

Replace All


"Starr" wrote:

I have a list of 1,400 names, most of which have 2 spaces preceding the name.
i would like to remove all the space. I read to put 2 spaces in the FIND &
the following in REPLACE WITH: =--substitute(a1,char(160),"") but that
didn't work possibly because it was posted in 2007.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 703
Default how do i delete spaces in multiple cells thoughout the workbook?

Hi
Look at the TRIM() function.

Regards,
Per

On 9 Sep., 04:15, Starr wrote:
I have a list of 1,400 names, most of which have 2 spaces preceding the name.
*i would like to remove all the space. *I read to put 2 spaces in the FIND &
the following in REPLACE WITH: =--substitute(a1,char(160),"") *but that
didn't work possibly because it was posted in 2007.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default how do i delete spaces in multiple cells thoughout the workboo

A couple ideas:

Sub Remove_CR_LF()
With Selection
..Replace What:=Chr(160), Replacement:=Chr(32), _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
..Replace What:=Chr(13) & Chr(10), Replacement:=Chr(32), _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
..Replace What:=Chr(10), Replacement:=Chr(32), _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
End With
End Sub

Sub tic_killer()
Set rr = ActiveSheet.UsedRange.SpecialCells(xlCellTypeConst ants, xlTextValues)
For Each r In rr
If r.PrefixCharacter = "'" Then
r.Value = r.Value
End If
Next
End Sub

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Per Jessen" wrote:

Hi
Look at the TRIM() function.

Regards,
Per

On 9 Sep., 04:15, Starr wrote:
I have a list of 1,400 names, most of which have 2 spaces preceding the name.
i would like to remove all the space. I read to put 2 spaces in the FIND &
the following in REPLACE WITH: =--substitute(a1,char(160),"") but that
didn't work possibly because it was posted in 2007.



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
Why can i not delete cells in my workbook? Ben Excel Discussion (Misc queries) 3 September 10th 08 12:11 PM
Delete spaces rexmann Excel Discussion (Misc queries) 4 March 7th 08 02:38 PM
delete cells from one workbook to another Lwerner Excel Worksheet Functions 1 April 16th 07 07:31 PM
removing unnecessary spaces from multiple cells sflady Excel Worksheet Functions 2 November 15th 05 12:05 PM
delete spaces CHARI Excel Worksheet Functions 2 September 9th 05 10:38 AM


All times are GMT +1. The time now is 07:43 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"