April 2006
Beginner
1114 pages
98h 16m
English
listcolumn.TotalsCalculation [= setting]
Sets or returns the type of calculation used to figure the total for this column. Possible settings are:
|
xlTotalsCalculationNone |
xlTotalsCalculationSum |
|
xlTotalsCalculationAverage |
xlTotalsCalculationCount |
|
xlTotalsCalculationCountNums |
xlTotalsCalculationMin |
|
xlTotalsCalculationStdDev |
xlTotalsCalculationVar |
|
xlTotalsCalculationMax |
The following code changes the Total Price column to a sum of its values:
Sub ChangeTotal( )
Dim ws As Worksheet, lst As ListObject, col As ListColumn
Set ws = ActiveSheet
Set lst = ws.ListObjects("Test List")
lst.ListColumns("Total Price").TotalsCalculation = xlTotalsCalculationSum
End SubRead now
Unlock full access