I've created this basketball game in which, after the game is finished the team stats are copied to each team's stat sheet. From there I want to copy the Points column (cells Q6-Q17) down to cells beginning at (L31-L41) and continuing to the next column (m,n,o,p..) for each game played. The below listed code works fine an a soccer game I created, that's because I keep the copied numbers in the same rows (6-17). I can't get it to work when I change the rows down to 31-42.
Sub PlayerStats()
Dim game As String
Dim stats(20, 21) As Variant
game = Cells(29, 10) 'game number
For Row = 6 To 17 'row of stats to copy
stats(Row, col) = Cells(Row, col + 17) 'column of stats to copy
Next Row
GoSub add
add: For Row = 31 To 42
Cells(Row, 11 + game) = stats(Row, col)
Next Row
End Sub
Bookmarks