Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kharpo7
 
Posts: n/a
Default Excel trim not working

I am trying to utilize the trim function in Excel. I enter the "=trim(A2)"
and press enter but leading spaces are still present. There are three leading
spaces in front of a customer name field and several trailing that I wish to
remove without having to manually do so. I have tried formatting the cells as
text or as general with no sucess.

Each time I still get " account name "

Am I missing a step?

  #2   Report Post  
Anne Troy
 
Posts: n/a
Default

Have you selected the cells, then hit Format-Cells, Alignment tab. Make sure
there's no indent, and that they're aligned left?
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"Kharpo7" wrote in message
...
I am trying to utilize the trim function in Excel. I enter the "=trim(A2)"
and press enter but leading spaces are still present. There are three

leading
spaces in front of a customer name field and several trailing that I wish

to
remove without having to manually do so. I have tried formatting the cells

as
text or as general with no sucess.

Each time I still get " account name "

Am I missing a step?



  #3   Report Post  
Kharpo7
 
Posts: n/a
Default

I didn't before you asked but now I have. For both the the origination column
and the formula column they are "General" for Text alignment and 0 for
Indent. I toggled the alignment to left, center and back to left but there
still appears to be the 3 spaces after hitting the left align button.

"Anne Troy" wrote:

Have you selected the cells, then hit Format-Cells, Alignment tab. Make sure
there's no indent, and that they're aligned left?
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"Kharpo7" wrote in message
...
I am trying to utilize the trim function in Excel. I enter the "=trim(A2)"
and press enter but leading spaces are still present. There are three

leading
spaces in front of a customer name field and several trailing that I wish

to
remove without having to manually do so. I have tried formatting the cells

as
text or as general with no sucess.

Each time I still get " account name "

Am I missing a step?




  #4   Report Post  
Harlan Grove
 
Posts: n/a
Default

Anne Troy wrote...
Have you selected the cells, then hit Format-Cells, Alignment tab. Make sure
there's no indent, and that they're aligned left?

....

Alignment might be a problem, but assuming the OP does know s/he's
talking about, it's more likely the 'spaces' are HTML nonbreaking
spaces (decimal character code 160) rather than ASCII spaces 9decimal
character code 32). The OP may have better luck changing the formula to

=TRIM(SUBSTITUTE(A2,CHAR(160),CHAR(32)))

  #5   Report Post  
Kharpo7
 
Posts: n/a
Default

Great! Thanks that got it

"Harlan Grove" wrote:

Anne Troy wrote...
Have you selected the cells, then hit Format-Cells, Alignment tab. Make sure
there's no indent, and that they're aligned left?

....

Alignment might be a problem, but assuming the OP does know s/he's
talking about, it's more likely the 'spaces' are HTML nonbreaking
spaces (decimal character code 160) rather than ASCII spaces 9decimal
character code 32). The OP may have better luck changing the formula to

=TRIM(SUBSTITUTE(A2,CHAR(160),CHAR(32)))




  #6   Report Post  
Anne Troy
 
Posts: n/a
Default

Sweet, Harlan. :)
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"Harlan Grove" wrote in message
oups.com...
Anne Troy wrote...
Have you selected the cells, then hit Format-Cells, Alignment tab. Make

sure
there's no indent, and that they're aligned left?

...

Alignment might be a problem, but assuming the OP does know s/he's
talking about, it's more likely the 'spaces' are HTML nonbreaking
spaces (decimal character code 160) rather than ASCII spaces 9decimal
character code 32). The OP may have better luck changing the formula to

=TRIM(SUBSTITUTE(A2,CHAR(160),CHAR(32)))



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 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Excel files in separate program windows Jason Dove Excel Discussion (Misc queries) 27 October 24th 08 07:58 PM
Simple formulas in existing Excel 2002 no longer working. AllieB Excel Worksheet Functions 3 May 3rd 05 04:14 PM
excel stopped working Steve Excel Discussion (Misc queries) 0 January 13th 05 04:07 AM
Replace function not working properly in Excel 2000 SP3 rgbytg Excel Worksheet Functions 5 November 11th 04 03:44 PM


All times are GMT +1. The time now is 12:22 PM.

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"