I'm trying to make a loop through lines to read each time a cell, and write into another sheet.
Sub boucle_for()
Dim col As Integer
Dim lig As Integer
Dim rr As Integer
Dim cc As Integer
col = 4
lig = 3
rr = 15
cc = 24
For i = 0 To 33
Range("R[" & col & "]C[" & lig & "]").Formula = "=AVG('Weekly Changes'!R[" & rr & "]C[" & cc & "]:R[" & (rr + 1) & "]C[" & (cc + 1) & "])"
rr = rr + 14
lig = lig + 1
Next
End Sub
My aim is to refer to a cell dynamically, but the VBA script says it's an error. I'm used to Java and JavaScript arrays, but I'm failing at this.
Where did I make a mistake?