Pivot Table subtotals

Kenny7sccr

New Member
Joined
May 13, 2015
Messages
17
Hello,

Is there a way to make the Pivot Table sub-totals duplicate the column labels?


The sub-totals are giving me the sum of values; I just want it to repeat the column label again within the sub-group essentially.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hello

Just click the desired pivot table cell and type your text.
 
Upvote 0
I have this pivot table being generated by VBA and want to auto send it. Everyday my data will be different so I can't hard code the text in
 
Upvote 0
I am not seeing your pivot table layout, but this code should convey the general idea.
It displays some information and changes one subtotal label.

Code:
Sub Subtotal_name()
Dim pt As PivotTable
Set pt = ActiveSheet.PivotTables("pivot3")


MsgBox "# column fields: " & pt.ColumnFields.Count & vbLf & "# row fields: " & pt.RowFields.Count & _
vbLf & "# calculated fields: " & pt.CalculatedFields.Count & vbLf & "# data fields: " & pt.DataFields.Count _
& vbLf & "# hidden fields: " & pt.HiddenFields.Count & vbLf & "# page fields: " & pt.PageFields.Count _
& vbLf & "# visible fields: " & pt.VisibleFields.Count & vbLf & "# pivot fields: " & pt.PivotFields.Count


pt.RowFields(1).SubtotalName = pt.ColumnFields(1).Name
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,857
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top