#1   Report Post  
ferdy
 
Posts: n/a
Default trim

I am struggling with Trim. Please can somebody advise me step by step what I
should do to remove an unwanted space from text entries. I have a column
which is approx 2000 rows long, and quite a few of the cells have a space
before the text (ie on the left hand side of the text). I am fairly sure the
work sheet contains imported data , as it is an address data base with quite
a few columns, and all the columns suffer from this problem (they are also
out of sequence across the columns in some cases but I can fix those
individually). I dont know which software the data was was exported from as
I was given the worsheet to cleanse. I think I should perhaps use Clean
first to see if they are actually spaces but I am not sure how to do this
either. Any help very gratefully received please.
  #2   Report Post  
Kassie
 
Posts: n/a
Default

With the incorrect data in A1, in B1 enter =TRIM(A1)
Copy down for all rows, then copy the range, and paste special values in
column A

"ferdy" wrote:

I am struggling with Trim. Please can somebody advise me step by step what I
should do to remove an unwanted space from text entries. I have a column
which is approx 2000 rows long, and quite a few of the cells have a space
before the text (ie on the left hand side of the text). I am fairly sure the
work sheet contains imported data , as it is an address data base with quite
a few columns, and all the columns suffer from this problem (they are also
out of sequence across the columns in some cases but I can fix those
individually). I dont know which software the data was was exported from as
I was given the worsheet to cleanse. I think I should perhaps use Clean
first to see if they are actually spaces but I am not sure how to do this
either. Any help very gratefully received please.

  #3   Report Post  
Neil
 
Posts: n/a
Default

If your string is in cell A1, and reads " My String" (Without quotes!)

Then to put a trimmed version in another cell use the formula

=Trim(A1)

in the target cell


HTH

Neil
www.nwarwick.co.uk

"ferdy" wrote:

I am struggling with Trim. Please can somebody advise me step by step what I
should do to remove an unwanted space from text entries. I have a column
which is approx 2000 rows long, and quite a few of the cells have a space
before the text (ie on the left hand side of the text). I am fairly sure the
work sheet contains imported data , as it is an address data base with quite
a few columns, and all the columns suffer from this problem (they are also
out of sequence across the columns in some cases but I can fix those
individually). I dont know which software the data was was exported from as
I was given the worsheet to cleanse. I think I should perhaps use Clean
first to see if they are actually spaces but I am not sure how to do this
either. Any help very gratefully received please.

  #4   Report Post  
ferdy
 
Posts: n/a
Default

Kassie & Neil
Thank you for your advice - it is so simple, but it has saved me hours and
hours of work.
I am very grateful.

"Neil" wrote:

If your string is in cell A1, and reads " My String" (Without quotes!)

Then to put a trimmed version in another cell use the formula

=Trim(A1)

in the target cell


HTH

Neil
www.nwarwick.co.uk

"ferdy" wrote:

I am struggling with Trim. Please can somebody advise me step by step what I
should do to remove an unwanted space from text entries. I have a column
which is approx 2000 rows long, and quite a few of the cells have a space
before the text (ie on the left hand side of the text). I am fairly sure the
work sheet contains imported data , as it is an address data base with quite
a few columns, and all the columns suffer from this problem (they are also
out of sequence across the columns in some cases but I can fix those
individually). I dont know which software the data was was exported from as
I was given the worsheet to cleanse. I think I should perhaps use Clean
first to see if they are actually spaces but I am not sure how to do this
either. Any help very gratefully received please.

  #5   Report Post  
Kassie
 
Posts: n/a
Default

Glad to have been of help. Thanks for the response

"ferdy" wrote:

Kassie & Neil
Thank you for your advice - it is so simple, but it has saved me hours and
hours of work.
I am very grateful.

"Neil" wrote:

If your string is in cell A1, and reads " My String" (Without quotes!)

Then to put a trimmed version in another cell use the formula

=Trim(A1)

in the target cell


HTH

Neil
www.nwarwick.co.uk

"ferdy" wrote:

I am struggling with Trim. Please can somebody advise me step by step what I
should do to remove an unwanted space from text entries. I have a column
which is approx 2000 rows long, and quite a few of the cells have a space
before the text (ie on the left hand side of the text). I am fairly sure the
work sheet contains imported data , as it is an address data base with quite
a few columns, and all the columns suffer from this problem (they are also
out of sequence across the columns in some cases but I can fix those
individually). I dont know which software the data was was exported from as
I was given the worsheet to cleanse. I think I should perhaps use Clean
first to see if they are actually spaces but I am not sure how to do this
either. Any help very gratefully received please.

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
Excel TRIM() can't handle   in pasted HTML dyt Excel Discussion (Misc queries) 2 March 31st 05 08:11 PM
TRIM? Cthulhu Excel Worksheet Functions 10 February 10th 05 09:36 PM
Trim function doesn't clean out ASCII Code 160 (Space) Ronald Dodge Excel Worksheet Functions 6 January 27th 05 03:48 AM
Trim function aehan Excel Worksheet Functions 3 January 25th 05 12:31 PM
How to use TRIM function Sky Warren Excel Worksheet Functions 3 January 8th 05 05:06 PM


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