g-boy wrote...
....
And so, I thought I could use this function:
=CORREL(INDIRECT("Patterns!R2C"&(ROW()+1)&":R375C "&(ROW()+1),FALSE),Patterns!B$2:B$375)
in each of the cells, and it would automatically have each row
calculate the
correlation with a different column of values.
But... it doesn't work. It gives me #N/A.
....
The problem is that ROW() always returns an array, even when the array
only contains a single entry. INDIRECT accepts array first arguments
and then returns undocumented things that act as if they were arrays of
range references. Those can be used only as arguments in the few
functions that require range reference arguments. CORREL isn't one of
those functions, so you need to convert the array generated by ROW() to
a scalar. The simplest way to do that is SUM(ROW()). Yes, it looks odd,
but try it.
For that matter, you'd be better off using
=CORREL(OFFSET(Patterns!$A$2:$A$375,0,SUM(ROW())), Patterns!B$2:B$375)
|