A
Al
I need help figuring out the syntax for using the counter
from a 'For' loop in the cell references. I marked the
lines I have wrong w/ 'X'. Both errors involve passing
the value of 'counter' into a 'Range' statement to specify
the row number in a Cell designation.
Dim counter As Integer
Dim temp As String
For counter = 1 To 10
temp = Worksheets("Sheet1").Cells(counter, 1).Value
Select Case temp
Case apple
X Range("A'counter':H'counter'").Select
Selection.Copy
Sheets("Sheet2").Select
X Range("A'counter+43'").Select
ActiveSheet.Paste
Case ....
End Select
Next i
from a 'For' loop in the cell references. I marked the
lines I have wrong w/ 'X'. Both errors involve passing
the value of 'counter' into a 'Range' statement to specify
the row number in a Cell designation.
Dim counter As Integer
Dim temp As String
For counter = 1 To 10
temp = Worksheets("Sheet1").Cells(counter, 1).Value
Select Case temp
Case apple
X Range("A'counter':H'counter'").Select
Selection.Copy
Sheets("Sheet2").Select
X Range("A'counter+43'").Select
ActiveSheet.Paste
Case ....
End Select
Next i