Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Removing leading/trailing spaces

Hello,

OK, having split my address column into separate columns for each line, I'm
now left with leading spaces in the 2nd and subsequent columns.

How do I remove these leading spaces?

I've experimented with the =TRIM() function and can happily create a
duplicate list on the same worksheet, but that's no good to me - I want the
TRIMmed data to be the only data so that I can use it for my mail merge. I
can't delete the original data, or move the TRIMmed data, because the =TRIM()
function no longer works, of course.

There must be some simple way to edit the whole worksheet to remove any
leading spaces in the cells, or some way of using =TRIM() to do it.

What have I missed this time? :)

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 341
Default Removing leading/trailing spaces

A very simple solution

1 - copy the worksheet to a new worksheet
2 - for the cells in the new worksheet, use the formula =TRIM(sheet1!B2) and
drag it across and down
3 - select all the cells in the new worksheet (use the little grey box above
row 1 and to the left of column A) where the cursor turns into a big white
cross
4 - copy
5 - Edit Paste Special Values

now you have a version of your sheet with just the TRIMed stuff in it. You
can paste it back over the original sheet if you want.
--
Allllen


"Chuda" wrote:

Hello,

OK, having split my address column into separate columns for each line, I'm
now left with leading spaces in the 2nd and subsequent columns.

How do I remove these leading spaces?

I've experimented with the =TRIM() function and can happily create a
duplicate list on the same worksheet, but that's no good to me - I want the
TRIMmed data to be the only data so that I can use it for my mail merge. I
can't delete the original data, or move the TRIMmed data, because the =TRIM()
function no longer works, of course.

There must be some simple way to edit the whole worksheet to remove any
leading spaces in the cells, or some way of using =TRIM() to do it.

What have I missed this time? :)

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 430
Default Removing leading/trailing spaces

You can copy the column of trimmed data and then 'paste special'...'values'
right over top of your original row. (Obviously always make sure your file
is backed up elsewhere before deleteing original data from your sheet.)

"Chuda" wrote:

Hello,

OK, having split my address column into separate columns for each line, I'm
now left with leading spaces in the 2nd and subsequent columns.

How do I remove these leading spaces?

I've experimented with the =TRIM() function and can happily create a
duplicate list on the same worksheet, but that's no good to me - I want the
TRIMmed data to be the only data so that I can use it for my mail merge. I
can't delete the original data, or move the TRIMmed data, because the =TRIM()
function no longer works, of course.

There must be some simple way to edit the whole worksheet to remove any
leading spaces in the cells, or some way of using =TRIM() to do it.

What have I missed this time? :)

Thanks.

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 keep Leading/Trailing spaces when save in Excel? jorgejulio Excel Discussion (Misc queries) 0 August 1st 06 09:49 PM
Removing spaces from columns Joni Hook Excel Worksheet Functions 2 May 26th 06 09:59 PM
Removing 2 extra spaces in front of dates in imported excel doc Hannah Excel Discussion (Misc queries) 4 April 12th 06 07:37 PM
Removing spaces in cells with data in it Ltat42a Excel Discussion (Misc queries) 7 August 7th 05 01:40 PM
Removing trailing spaces from cells ? Don Guillett Excel Worksheet Functions 0 April 10th 05 03:32 PM


All times are GMT +1. The time now is 03:18 PM.

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

About Us

"It's about Microsoft Excel"