T
TFriis
Using VBA, I populated a two dimensional array with values. I want use
various "rows" and "columns" of the array as inputs into an Excel
function. For example:
Dim arr As Variant
Dim answer as Double
arr = Range("A1:B10").Value
answer =
application.worksheetfunction.correl(arr(column1),arr(column2))
something that would have the same result as:
answer =
application.worksheetfunction.correl(range("A1:A10"),range("B1:B10"))
I'd prefer not to paste the array back to a sheet to run the
calculation.
I'd prefer not to populate one dimensional arrays based on the columns
of the two dimensional array.
Basically, I'm looking to easily address subsets/subranges of a multi-
dimensioned array.
various "rows" and "columns" of the array as inputs into an Excel
function. For example:
Dim arr As Variant
Dim answer as Double
arr = Range("A1:B10").Value
answer =
application.worksheetfunction.correl(arr(column1),arr(column2))
something that would have the same result as:
answer =
application.worksheetfunction.correl(range("A1:A10"),range("B1:B10"))
I'd prefer not to paste the array back to a sheet to run the
calculation.
I'd prefer not to populate one dimensional arrays based on the columns
of the two dimensional array.
Basically, I'm looking to easily address subsets/subranges of a multi-
dimensioned array.