LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dnk Dnk is offline
external usenet poster
 
Posts: 8
Default Left Function in code

Try something Like this:

Sub ParseString()
Dim S As Variant
Dim r As Range
Dim c As Integer
Dim N1 As String
Dim N2 As String

c = 1
For Each S In Range("A1:A4000")
N1 = Left(S, 7)
N2 = Right(S, 2)
Cells(c, 2) = "'" & N1
Cells(c, 3) = "'" & N2

c = c + 1
Next S
End Sub
Derick



Les Stout wrote in message ...
Thanks very much Chip, a further question to that.
The column has approx. 4000 parts in it would it be better to loop it
down? or do you have a better suggestion. I am wanting to do it
automated, running in the background.

Your assistance is much appreciated.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


 
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
How to nest a left function within a sumif function? LisaK Excel Worksheet Functions 2 April 23rd 23 11:46 AM
LEFT function-all to left of a comma? Jennifer F Excel Worksheet Functions 1 January 21st 09 11:19 PM
How can I get a leading zero (ZIP code) to show in a LEFT() calc? MarketStEl Excel Worksheet Functions 2 December 11th 07 04:35 AM
Left vs Left$ function Andy Excel Discussion (Misc queries) 5 May 6th 07 04:06 AM
how to display zero at the left hand of a code in a cell say 045 Marie Excel Discussion (Misc queries) 3 June 12th 06 10:41 AM


All times are GMT +1. The time now is 10:16 PM.

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

About Us

"It's about Microsoft Excel"