View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Neeraja Neeraja is offline
external usenet poster
 
Posts: 5
Default Trim function in Excel Doesn't work for certain cells

Hi,

Could someone help me with this problem!

My Excel sheet has a Macro which has a procedure to
remove spaces from the cell value and insert in to
another Sheet.
Eg:My code is as simple as follows:

b = Sheets("ABC").Range("A5").value
Sheets("XYZ").Range("A1").value = Trim(b)

This Trim function removes forward and back spaces in
some Cells, but just ignores spaces in some Cells, and as
a result in the output i get some Cells with the Spaces
in the values.
I wonder if Excel has a variety of Spaces which are
different from each other, Because my Macro handles
certain spaces and ignores others???

I Appreciate any help.
Thanks,
Neeraja.