Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

spacing issues...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dstiefe - 21 Mar 2006 22:35 GMT
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 - 21 Mar 2006 23:10 GMT
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

Signature

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

>I have a list of names that have a space in the beginning.  For
>example:
[quoted text clipped - 7 lines]
>
> Thank you
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.