View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Scott Wagner Scott Wagner is offline
external usenet poster
 
Posts: 82
Default VBA help please - remove leading spaces

In column D of my worksheet some of the cell contents have a varying number
of spaces. How can I removed any leading spaces from those cells with VBA?

There are spaces within the cells (not leading) that I want to keep.

Example below.

Here is what I have now:

ColD
This is the text
Blah Blah Blah
Blah Blah Blah Blah
This is the text

Here is what I'd like to end up with:

ColD
This is the text
Blah Blah Blah
Blah Blah Blah Blah
This is the text

Thanks in advance!

Scott