R
Rich_84
Hi,
I have a macro which reads an excel range directly into an array, which I
then can use in worksheet functions e.g.:
DimMyArray As Variant
Dim MyResult As Double
MyArray = Range("A2:A21").Value
MyResult = WorksheetFunction.NPV(0.1, MyArray)
This seems to be really effective performance-wise, so my question is:
is there a way to add together 2 identically sized arrays created in this
way, but without just looping through the elements 1-by-1 (as this may be
quite a drag on performance?).
Thanks,
Richard
I have a macro which reads an excel range directly into an array, which I
then can use in worksheet functions e.g.:
DimMyArray As Variant
Dim MyResult As Double
MyArray = Range("A2:A21").Value
MyResult = WorksheetFunction.NPV(0.1, MyArray)
This seems to be really effective performance-wise, so my question is:
is there a way to add together 2 identically sized arrays created in this
way, but without just looping through the elements 1-by-1 (as this may be
quite a drag on performance?).
Thanks,
Richard