WksStatistics Object
The WksStatistics object holds results calculated by the WksRange.Statistics method. Once calculated, the statistics stored in this object do not change, even if the cells in the source WksRange change.
The following table provides the properties of the WksStatistics object. All these properties are read-only properties.
Property |
Description |
Returns the application object. |
|
Returns the average deviation of the data values in the column from which the statistics were calculated. |
|
Returns the coefficient of variation of the data values in the column from which the statistics were calculated. |
|
Returns the number of columns for which statistics are stored. |
|
Returns the 95% confidence interval for the mean of the data values in the column from which the statistics were calculated. |
|
Returns the 99% confidence interval for the mean of the data values in the column from which the statistics were calculated. |
|
Returns the number of data values in the column from which the statistics were calculated. |
|
Returns the first quartile (25th percentile) of the data values in the column from which the statistics were calculated. |
|
Returns the first row from which the data were retrieved |
|
Returns the 90% critical value of the Kolmogorov-Smirnov statistic for the number of data values in the column from which the statistics were calculated. |
|
Returns the 95% critical value of the Kolmogorov-Smirnov statistic for the number of data values in the column from which the statistics were calculated. |
|
Returns the 99% critical value of the Kolmogorov-Smirnov statistic for the number of data values in the column from which the statistics were calculated. |
|
Returns the Kolmogorov-Smirnov goodness-of-fit statistic (versus a normal probablility curve) for the data values in the column from which the statistics were calculated. |
|
Returns the coefficient of kurtosis for the data values in the column from which the statistics were calculated. |
|
Returns the label for the column containing the data from which the statistics were calculated. |
|
Returns the last row from which the data were retrieved |
|
Returns the maximum of the data values in the column from which the statistics were calculated. |
|
Returns the mean of the data values in the column from which the statistics were calculated. |
|
Returns the median of the data values in the column from which the statistics were calculated. |
|
Returns the mimimum of the data values in the column from which the statistics were calculated. |
|
Returns the number of missing data values in the column from which the statistics were calculated. |
|
Returns the data value or values that appear most often in the column from which the statistics were calculated. |
|
Returns the worksheet from which the Statistics were calculated. |
|
Returns the difference between the maximum and minimum data values in the column from which the statistics were calculated. |
|
Returns the coefficient of skewness for the data values in the column from which the statistics were calculated. |
|
Returns the standard deviation of the data values in the column from which the statistics were calculated. |
|
Returns the standard error of the data values in the column from which the statistics were calculated. |
|
Returns the sum of the data values in the column from which the statistics were calculated. |
|
Returns the third quartile (75th percentile) of the data values in the column from which the statistics were calculated. |
|
Returns the variance of the data values in the column from which the statistics were calculated. |
Example
The following script demonstrates how the WksStatistics object is used in reference to the WksRange object.
Sub Main
'Declares SurferApp as an object
Dim SurferApp As Object
'Creates an instance of the Surfer Application object and assigns it
'to the variable named "SurferApp"
Set SurferApp = CreateObject("Surfer.Application")
'Makes Surfer visible
SurferApp.Visible = True
'Declares Wks as an object
Dim Wks As Object
'Opens a worksheet document in Surfer and assigns it to the
'variable named "Wks"
Set Wks = SurferApp.Documents.Open(FileName:=SurferApp.Path+"\Samples\demogrid.dat")
'Declares WksRange as an object
Dim WksRange As Object
'Assigns columns A, B, and C to the variable named "WksRange"
Set WksRange = Wks.Columns(Col1:=1, Col2:=3)
'Uses the WksRange object statistics method to store statistics
Set Stats = WksRange.Statistics(Sample:=True, Header:=True, Flags:=wksStatsAll)
End Sub