Gary Student ? How do I add a For next to this.....Macro

C

cgnotrom

With the loop I need to increment (M6:O6) and ("D6") to;
M7 O7 D7 and M8 O8 D8
Then the data would move to sheet 11 12 & 13
I keep getting a run time error
Thank in advance
Chris

Sub copythere()
For i = 6 to 8
Dim s As String
Set s1 = Sheets("Input")
Set r1 = Sheets("Input").Range("M6:O6")
n = 10 * s1.Range("D4").Value + s1.Range("D6").Value
s = n
Set s2 = Sheets(s)
rrow = s1.Range("D3") + 13
r1.Copy s2.Cells(rrow, "F")
Next i
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top