This documentation is archived and is not being maintained.

PivotField.AutoSortCustomSubtotal Property

Office 2007
Returns the name of the custom subtotal used to sort the specified PivotTable field automatically. Read-only.

Version Information
 Version Added:  Excel 2007

Syntax

expression.AutoSortCustomSubtotal

expression   A variable that represents a PivotField object.

Remarks

The default value is 1 (Automatic). When the AutoSortCustomSubtotal property is set to 1 (Automatic), the data is sorted by the regular subtotals. The AutoSortCustomSubtotal property can have one of the index values listed in the following table.

1Automatic
2Sum
3Count
4Average
5Max
6Min
7Product
8Count Nums
9StdDev
10StdDevp
11Var
12Varp

Sorting is supported only by custom subtotals that are actually displayed in the PivotTable, so trying to set AutoSortCustomSubtotal to a value representing a custom subtotal not in the PivotTable view will return a run-time error.

If sorting is applied based on a custom subtotal, and that subtotal is removed from the PivotTable, the AutoSortCustomSubtotal property will automatically be set to the default value (1).




Show: