Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 1.51 KB

Excel.PivotField.AutoSortCustomSubtotal.md

File metadata and controls

52 lines (35 loc) · 1.51 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PivotField.AutoSortCustomSubtotal property (Excel)
vbaxl10.chm240149
vbaxl10.chm240149
Excel.PivotField.AutoSortCustomSubtotal
9f930467-25ca-bf09-da3e-da7d3c9e6b70
05/04/2019
medium

PivotField.AutoSortCustomSubtotal property (Excel)

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

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.

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

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).

[!includeSupport and feedback]