Whisky
07-23-2018, 07:00 AM
Hi
I have an array based on data read in from Excel that I would like to calculate summary stats based on the subset of the data but I am getting an error.
So for example where Y is the array, the following average calculation of the array works fine.
MEAN = Application.WorksheetFunction.Average(y)
Now I would like to run the same calculation based on only observation 66 to 77 of the array and I am trying to use Index based on examples I have found online but it does not work saying "unable to get average of worksheet function class" :
MEAN = Application.WorksheetFunction.Average(Application.WorksheetFunction.Index(y , 1, Evaluate("ROW(66:77)")))
Anyone know why this doesn't work /what am I doing wrong?
Thanks
W
I have an array based on data read in from Excel that I would like to calculate summary stats based on the subset of the data but I am getting an error.
So for example where Y is the array, the following average calculation of the array works fine.
MEAN = Application.WorksheetFunction.Average(y)
Now I would like to run the same calculation based on only observation 66 to 77 of the array and I am trying to use Index based on examples I have found online but it does not work saying "unable to get average of worksheet function class" :
MEAN = Application.WorksheetFunction.Average(Application.WorksheetFunction.Index(y , 1, Evaluate("ROW(66:77)")))
Anyone know why this doesn't work /what am I doing wrong?
Thanks
W