I could not remove the trailing space in an Excel 2010 column with the Trim() function. Doing a little research led me to believe this might possibly be caused by the space being something other than the ASCII code for space. (Decimal 32).
The function I used to find this.
It returned a code of 160. This is ASCII for the HTML non-breaking space ( )
To fix this I found some information posted on a help board. By opening the Find & Replace dialog in Excel you hold down the Alt key while typing 0160 in the Find what: input.
For whatever reason, either bad typing or belligerent application it took me a couple of time both times I needed to do this.
BTW – the reason this occurred was I copied a report generated from a web application and got returned as HTML. While I didn’t copy the source Excel made the determination that it should include the HTML code.