SubtotalName Property

Microsoft Excel Visual Basic

SubtotalName Property

       

Returns or sets the text string label displayed in the subtotal column or row heading in the specified PivotTable report. The default value is the string "Subtotal". Read/write String.

Example

This example sets the subtotal label to "Regional Subtotal" (instead of the default string "Subtotal") in the state field in the second PivotTable report on the active worksheet.

ActiveSheet.PivotTables("PivotTable2") _
    .PivotFields("state").SubtotalName = "Regional Subtotal"