Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Column and row advance

I asked this earlier but it may not have been clear. To advance the rows in
a for statement is easy. So in the case below it is checking from A1 to A31
for the date and when it matches it copies over to the B and C columns.

So how do you check from columns B, C, D, E, and F? so I could do another
For/next statement inside to go from B to F so let column=a, then column =
column + ???? so that it goes to B, then cycles through the loop and goes to
C and so on until it cycles through 5 times 9 from B to F. I know that the +1
does not work so how can you cycle through letters?

Dim i As Integer
Let i = 1
For i = 1 To 31
If datecurrent = Worksheets("73-1 Data").Range("a" & i) Then
Worksheets("73").Range("b40").Copy Destination:=Worksheets("73-1
Data").Range("b" & i)
Worksheets("73").Range("b41").Copy Destination:=Worksheets("73-1
Data").Range("c" & i)
Worksheets("73").Range("b42").Copy Destination:=Worksheets("73-1
Data").Range("d" & i)
Worksheets("73").Range("b43").Copy Destination:=Worksheets("73-1
Data").Range("e" & i)
Worksheets("73").Range("b44").Copy Destination:=Worksheets("73-1
Data").Range("f" & i) Endif
Next i

Dim i As Integer
Let i = 1
For i = 1 To 31
If datecurrent = Worksheets("73-1 Data").Range("a" & i) Then
For column = 1 to 5
Worksheets("73").Range("b40").Copy Destination:=Worksheets("73-1
Data").Range(column & i)
column = column +1
Next column
Endif
Next i


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Column and row advance

I got it

Let i = 1
For i = 1 To 31
If datecurrent = Worksheets("73-1 Data").Range("a" & i) Then
For column = 2 To 6
Worksheets("73").Range("b40").Copy Destination:=Worksheets("73-1
Data").Cells(i, column)
Next column
Endif
Next i

"JTWarthogs" wrote:

I asked this earlier but it may not have been clear. To advance the rows in
a for statement is easy. So in the case below it is checking from A1 to A31
for the date and when it matches it copies over to the B and C columns.

So how do you check from columns B, C, D, E, and F? so I could do another
For/next statement inside to go from B to F so let column=a, then column =
column + ???? so that it goes to B, then cycles through the loop and goes to
C and so on until it cycles through 5 times 9 from B to F. I know that the +1
does not work so how can you cycle through letters?

Dim i As Integer
Let i = 1
For i = 1 To 31
If datecurrent = Worksheets("73-1 Data").Range("a" & i) Then
Worksheets("73").Range("b40").Copy Destination:=Worksheets("73-1
Data").Range("b" & i)
Worksheets("73").Range("b41").Copy Destination:=Worksheets("73-1
Data").Range("c" & i)
Worksheets("73").Range("b42").Copy Destination:=Worksheets("73-1
Data").Range("d" & i)
Worksheets("73").Range("b43").Copy Destination:=Worksheets("73-1
Data").Range("e" & i)
Worksheets("73").Range("b44").Copy Destination:=Worksheets("73-1
Data").Range("f" & i) Endif
Next i

Dim i As Integer
Let i = 1
For i = 1 To 31
If datecurrent = Worksheets("73-1 Data").Range("a" & i) Then
For column = 1 to 5
Worksheets("73").Range("b40").Copy Destination:=Worksheets("73-1
Data").Range(column & i)
column = column +1
Next column
Endif
Next i


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
An Advance IF Manos Excel Worksheet Functions 3 October 2nd 08 02:54 PM
A Year in advance ? Finance Guru Excel Worksheet Functions 11 February 27th 08 11:16 AM
advance filtering [email protected] Excel Discussion (Misc queries) 3 February 28th 06 04:24 PM
I need a little help...thanks in advance Jambruins Excel Discussion (Misc queries) 1 August 3rd 05 06:00 PM
Here's one for you...(thanks for the help in advance) Jambruins Excel Discussion (Misc queries) 2 July 15th 05 07:41 PM


All times are GMT +1. The time now is 06:40 PM.

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"