Hello,

I am using VBA for a model which requires calculation of Standard Deviation.
The model already exists in Excel, using STDEV application function, so the VBA model is expected to give the same result.

However, using VBA's Worksheet.applicationfunction.STDEV gives a different result from the STDEV result computed in the cells. Both computations were done on the same data.

I have used the 6 different functions available in Excel, the results are as follows:
STDEV = 0.0052071061943
STDEVA = 0.0052071061943
STDEVS = 0.0052071061943
STDEVPA = 0.0052037969431
STDEVP = 0.0052037969431
STDEVP = 0.0052037969431

The 3 functions available in VBA also give different results, none of which agree with any of the ones computed in Excel. VBA Results:
STDEV = 0.0052038062902
STDEVS = 0.0052038062902
STDEVP = 0.0052005033345


The temporary solution I have adopted is to have a formula in a designated cell, compute STDEV using the Excel function, and then have VBA pick the result from that cell.

Has anyone else noticed this problem?
Is there an explanation for this?
Is there a better workaround?

Thank you

Yemi