spacing issues...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a list of names that have a space in the beginning. For example:

" Daniel james"
" Michael james madison"

The list of names has a space before the "D" and the "M" in this example.
How do I loop through the column and delete/remove the space?

Thank you
 
Select the cells and run the following code:

Sub AAA()
Dim Rng As Range
For Each Rng In Selection.Cells
Rng.Value = LTrim(Rng.Text)
Next Rng
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Issue with blanks and spaces 56
Programming question 5
Inserting and deleting spaces with a macro 7
counting spaces 5
How-To Remove Extra Spaces 4
Matching 2 lists 2
How to compress interstitial spaces? 6
Names 5

Back
Top