ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   spacing issues... (https://www.excelbanter.com/excel-programming/356721-spacing-issues.html)

dstiefe

spacing issues...
 
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

Chip Pearson

spacing issues...
 
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


"dstiefe" wrote in message
...
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





All times are GMT +1. The time now is 01:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com