View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ken Wright
 
Posts: n/a
Default Macro to eliminate extra space

Trimall macro

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

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------




"kleivakat" wrote in message
...
I've imported a query from an AS400 database, and in the column that I'm
using as my "sort", many of the entries start with a blank space. I can
left-justify, but there's still a blank space in some of them, which is
messing up my sort. Is there a macro that I can write to eliminate a
blank
space at the beginning of any cell entry? Additionally, some cells begin
with a "<", or a "{" that is unnecessary. I'd like to be able to
eliminate
those extraneous characters or blank spaces using a macro if possible.
Thanks for any help.

K-