TotalsCalculation Property [Excel 2003 VBA Language Reference]
Determines the type of calculation in the Totals row of the list column based on the value of the XlTotalsCalculation enumeration. Read/write.
XlTotalsCalculation can be one of these XlTotalsCalculation constants. |
xlTotalsCalculationNone |
xlTotalsCalculationSum |
xlTotalsCalculationAverage |
xlTotalsCalculationCount |
xlTotalsCalculationCountNums |
xlTotalsCalculationMin |
xlTotalsCalculationStdDev |
xlTotalsCalculationVar |
xlTotalsCalculationMax |
expression.TotalsCalculation
expression Required. An expression that returns one of the items in the Applies To list.
Remarks
The Totals row doesn't need to be showing in order to set this property. There is no fixed "default" value for this property. Excel may change the state of this property, as other columns are added or deleted.
Example
This example sets the calculation type of the Totals row in the active worksheet to sum.
ActiveSheet.ListColumns(1).TotalsCalculation=xlTotalsCalculationSum
Applies to | ListColumn Object