View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default Removing space characters

I am using Excel 2003 to create reports from ISPF *.csv files. Due to the
type of dataset I'm using, many of the cells will contain space characters
that I will want to delete. For the majority of the report, a simple
"Replace" code will work well, but there are some cells that need only the
space characters on the left removed. Also, the length of data that needs
to be reported varies dramatically. So, how can I format the text in a
cell so that all of the spaces within the text remain, and those on the
left of the last character are removed?


Since you asked in the programming newsgroup, I assume you want a VBA
answer... look up the LTrim function in the help files.

Rick