I am wondering how to use sample covariance in my VBA code.
I can use Application.WorksheetFunction.Covar(array_1,array_2) to get the population covariance, but how about the sample covariance? I realize that there are COVARIANCE.S and COVARIANCE.P Functions in the formula bar. How can I use them in my VBA code?
Thanks
In xl2010 you can certainly use
Application.WorksheetFunction.Covariance_PEvaluateor the shorthand[]is your friend for calculating functions