Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Left string in VBA

Hello Everyone,

What is the VBA equivalent to LEFT(A1,3) which we use in formulas so that I
can do the following:

I am trying to write some code in VBA that will kind of parse a form and
format it on a copied book. That part is all done. Then I want to insert
rows with dates that are not parsed from my document. Example.. my parsed
form looks like this:

09/04/04 text
09/05/04 text
09/06/04 text

I want to make it so that the dates from the 1st to the 4th, are created
before the ones above to look like this:

09/01/04 OFF
09/02/04 OFF
09/03/04 OFF
09/04/04 text
09/05/04 text
09/06/04 text


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Left string in VBA

Confused. Where does LEFT(A1,3) come into it?

VBA has a LEFT function, but it works on a string( LEFT("Michael",3)), or a
string variable (LEFT(myVar,3)), or even a cell reference.
(LEFT(Range("A1").Value,3))

--

HTH

RP

"Michael Vaughan" wrote in message
...
Hello Everyone,

What is the VBA equivalent to LEFT(A1,3) which we use in formulas so that

I
can do the following:

I am trying to write some code in VBA that will kind of parse a form and
format it on a copied book. That part is all done. Then I want to insert
rows with dates that are not parsed from my document. Example.. my parsed
form looks like this:

09/04/04 text
09/05/04 text
09/06/04 text

I want to make it so that the dates from the 1st to the 4th, are created
before the ones above to look like this:

09/01/04 OFF
09/02/04 OFF
09/03/04 OFF
09/04/04 text
09/05/04 text
09/06/04 text




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
when inserting new worksheets they read right to left not left to. Andy Setting up and Configuration of Excel 2 December 3rd 08 09:51 PM
How to extract left-most number from a string Jason[_11_] Excel Worksheet Functions 16 October 9th 08 11:10 PM
Remove left text string Luc in Oxford Excel Discussion (Misc queries) 2 August 23rd 05 10:57 AM
How to change the right-to-left worksheet to left-to-right workshe RAMA Excel Discussion (Misc queries) 1 July 4th 05 01:57 PM
Help w/ Left, Right, Mid String DizzyD[_2_] Excel Programming 0 September 14th 04 09:48 PM


All times are GMT +1. The time now is 08:19 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"