SubtotalName Property 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"