Very new to VBA and trying to write a macro that has a loop within a loop. I'd like the whole code to run 30 times
For i = 1 To 30
Worksheets("Salary Extract (SPs Only)").Range("B" & (1 + i)).Copy
Worksheets("Pitcher Matchup Analysis").Paste
Destination = Worksheets("Pitcher Matchup Analysis").Range("B9")
For i = 1 To 9
Worksheets("Pitcher Matchup Analysis").Range("B" & (38 + i)).Copy
Worksheets("Batter Matchup Analysis").Paste
Destination = Worksheets("Batter Matchup Analysis").Range("B1")
Worksheets("Batter Matchup Analysis").Range("B88:AC88").Copy
Worksheets("Pitcher Matchup Analysis").Range("C" & (38 + i) & "AD" & (38 + i)).PasteSpecial xlPasteValues
Next i
Worksheets("Pitcher Matchup Analysis").Range("A71:R71").Copy
Worksheets("Pitcher Comparison").Range("A" & (1 + i) & "R" & (1 + i)).PasteSpecial xlPasteValues
Next i
End Sub
Within each loop I'd like this block to loop 9 times
For i = 1 To 9
Worksheets("Pitcher Matchup Analysis").Range("B" & (38 + i)).Copy
Worksheets("Batter Matchup Analysis").Paste
Destination = Worksheets("Batter Matchup Analysis").Range("B1")
Worksheets("Batter Matchup Analysis").Range("B88:AC88").Copy
Worksheets("Pitcher Matchup Analysis").Range("C" & (38 + i) & "AD" & (38 + i)).PasteSpecial xlPasteValues
Next i
My guess is this is a fairly simple fix but I'm not sure and couldn't figure it out looking at other questions.