View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Function =Trim()

copied from a webpage

More than likely, these are not standard char 32 space characters but are
html non-breaking space characters, char 160. TRIM/CLEAN will not remove
them.

Instead of using a formula on every cell I recommend you try this macro and
do it in bulk. I copy/paste stuff from the web every day and have to deal
with this.

There is a macro at this link that will remove these char 160 space
characters:

http://www.mvps.org/dmcritchie/excel/join.htm#trimall

--
Biff
Microsoft Excel MVP


"Dowitch" wrote in message
...
I've been using Trim to delete extra spaces from fields that contain
imported
data. Today I tried to use it on data that I'd copied from a webpage and
inserted into a spreadsheet, but it wouldn't take off the blanks after the
numbers. Am I mis-using the function? These were numbers that I'd copied
as
a bulk which 'self-segregated' into individual cells. I then re-copied
them
changing from colums to rows using Paste-Special. Then I tried to use
Trim,
but it had no effect. I needed to remove the spaces so that I could
divide
the numbers by 100.