I am working with the lines:
I would like to be able to run a simple correlation using arrays with a variable length of objects defined by worksheet inputs and dim as variant. My goal is to be able to run the correlation using all the values in the variant X and variant TempSample. Both have the same number of objects.
what is the correct syntax to do so?
when I do the correlation calculation long hand my values are different. Thanks!
Code:
ArrX = Application.WorksheetFunction.Index(X, 0, 2)
ArrTemp = Application.WorksheetFunction.Index(TempSample, 0, 2)
DistanceMeasure = (1 - Application.WorksheetFunction.Correl(ArrX, ArrTemp)) * 100
I would like to be able to run a simple correlation using arrays with a variable length of objects defined by worksheet inputs and dim as variant. My goal is to be able to run the correlation using all the values in the variant X and variant TempSample. Both have the same number of objects.
what is the correct syntax to do so?
when I do the correlation calculation long hand my values are different. Thanks!
Last edited: