Text won't Trim

P

Perico

I have some data in a column and I am unable to trim the data with trim functions in either Excel or Access. I test the spaces and character code 160 is returned

This is Office2k. Why isn't the Trim function working and is there a work around? I'm trying to trim 2 empty spaces at the end of each value in a field
 
J

Jeff Standen

I don't know why it isn't working, but you could do something like

=LEFT(A1,LEN(A1)-2)

Where A1 is the cell you want to trim.

Jeff

Perico said:
I have some data in a column and I am unable to trim the data with trim
functions in either Excel or Access. I test the spaces and character code
160 is returned.
This is Office2k. Why isn't the Trim function working and is there a work
around? I'm trying to trim 2 empty spaces at the end of each value in a
field.
 
D

David McRitchie

Hi Perico,
See TRIMALL macro in
http://www.mvps.org/dmcritchie/excel/join.htm#trimall

and always keep in mind that Excel is not MS Word, though
the comparisons do help explain what you want.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

Perico said:
I have some data in a column and I am unable to trim the data with trim functions in either Excel or Access. I test the spaces
and character code 160 is returned.
 
C

Captain_Nemo

Jeff -

ASCII 160 is the "hard" or "non-breaking" space. ASCII 30 is the space
that's trimed.

Jeff Standen said:
I don't know why it isn't working, but you could do something like

=LEFT(A1,LEN(A1)-2)

Where A1 is the cell you want to trim.

Jeff


functions in either Excel or Access. I test the spaces and character code
160 is returned.
around? I'm trying to trim 2 empty spaces at the end of each value in a
field.

--
Email to [email protected] (yes, you can so figure it out) ;-]

Scream and shout and jump for joy! I was here before Kilroy!

Sorry to spoil your little joke. I was here but my computer broke. ---Kilroy
 
Top