Google Answers Logo
View Question
 
Q: TRIM in Excel ( No Answer,   2 Comments )
Question  
Subject: TRIM in Excel
Category: Computers > Software
Asked by: ms2005-ga
List Price: $4.50
Posted: 17 Apr 2005 10:23 PDT
Expires: 22 Apr 2005 10:37 PDT
Question ID: 510453
Im trying to use excel to remove a leading space from a cell, however
TRIM(A1) function is not working to remove the space. In addition, I
get a ?NAME error if I try to use LTRIM. Anyone know how to solve
this?

Request for Question Clarification by hammer-ga on 17 Apr 2005 20:15 PDT
ms2005-ga,

TRIM(A1) is working fine for me. Could you describe what you mean by
not working? What did you type in A1? What does TRIM(A1) return?

- Hammer

Clarification of Question by ms2005-ga on 17 Apr 2005 20:45 PDT
Hammer- see this- 
Music
 music
 music download
 free music downloads
 music video

See how those have leading spaces in front of them? Pretend that was
column "A". In column "B" I set a function "=TRIM(A1)" then on the
next line "=TRIM(A2)" etc. But it will not get the space out for me.
Can you tell me the exact steps to make TRIM work? Maybe I need to
have something highlighted or??? Thanks.

Request for Question Clarification by hammer-ga on 18 Apr 2005 04:45 PDT
So, if it says in A1
 music

... When you put the following formula in B1:
=TRIM(A1)

... B1 displays
 music

... instead of
music

Is this correct, or are you seeing something else?

- Hammer

Clarification of Question by ms2005-ga on 18 Apr 2005 07:51 PDT
-Hammer-

That is how it should work- and yet it is not removing the leading
space for me. My formulas etc look to be correct. It might be having
something selected differently etc? Any additional thoughts?
Answer  
There is no answer at this time.

Comments  
Subject: Re: TRIM in Excel
From: joet31124-ga on 18 Apr 2005 06:24 PDT
 
I suspect that the reason TRIM isn't working is because the leading
space is a hard space - char(160) rather than a regular space,
char(32). The simplest way to solve this is to highlight the leading
character from the formula bar and copy it to the clipboard using
ctrl-c. Then, go to replace in the edit menu and paste the character
using ctrl-v into the "search for" box. In the "replace with" box,
just hit the space bar once. Click on replace all. You could just
leave the "replace with" box empty, but there's a danger that it would
replace legitimate spaces with nothing, removing the spaces. When you
have replaced all the hard spaces, TRIM should work properly.
Subject: Re: TRIM in Excel
From: kart91-ga on 21 Apr 2005 23:48 PDT
 
Yup, what joet31124-ga says will work fine.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy