-
Correlation Matrix through relative refrances
I am trying to find correllations between an fixed array and then four others through relative refrancing.
Sub x()
Dim i As Integer
i = 0
For i = 0 To 5
Cells(9, 2 + i).FormulaR1C1 = "=CORREL(R[-7]C:R[-3]C,R[-7]C[1 + i]:R[-3]C[1+i])"
Next
End Sub
I thought this would work, but I get a application or object defined error
-
The i in the formula is causing a #NAME! error.
[VBA]Cells(9, 2 + i).FormulaR1C1 = "=CORREL(R[-7]C:R[-3]C,R[-7]C[" & (1 + i) & "]:R[-3]C[" & (1 + i) & "])"[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules