Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Spacing between characters FJ Excel Discussion (Misc queries) 5 May 23rd 07 02:44 AM
Spacing Macro Silent Excel Programming 1 July 12th 05 07:52 PM
SPACING RAJEEV CHADHA Excel Worksheet Functions 5 April 18th 05 02:11 PM
Spacing Greg[_20_] Excel Programming 8 March 31st 05 04:20 PM
Spacing Hasan Excel Programming 2 June 16th 04 01:08 AM


All times are GMT +1. The time now is 09:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"