Minimum, Maximum, Average, and Standard Deviation from Array

Category:
Dates and Math
Type:
Modules
Difficulty:
Intermediate
Author:
Peter Wester

Version Compatibility: Visual Basic 6

More information:
The function MinMaxAverageStd can be applied on one- and/or multidimensional arrays. The minimum, maximum, average, standard deviation, number of elements, sum of the individual values and the sum of the square of the individual values are returned from the specified column in the array.
'syntax:

'ResultArray = MinMaxAverageStd(MyArray , [column to be sorted], [StartIndex], [EndIndex])

'StartIndex -- EndIndex : range to be sorted (expressed as indices)
'ResultArray(0) = Min
'ResultArray(1) = Max
'ResultArray(2) = Average
'ResultArray(3) = Standard deviation
'ResultArray(4) = n
'ResultArray(5) = sum of individual values
'ResultArray(6) = sum of square of individual values

Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.

Download minmaxavstdev.zip