Pivot Table Macro To Show Grand Totals

mayoung

Board Regular
Joined
Mar 26, 2014
Messages
181
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I have Pivot Table I have created through a macro. Now what I want to do is create a macro to open and show the detail of each grand total result for each technician.
The number of technicians can change., but the technician row is always in the same spot. But the grand total row can change, does not always stay the same.

I was able to record the below code but know that will not work for the criteria I outlined above. Also see attached picture for the pivot table.

VBA Code:
Sub Macro2()
'
    Range("B23").Select
    Selection.ShowDetail = True
    Sheets("PivotTable").Select
    Range("C23").Select
    Selection.ShowDetail = True
    Sheets("PivotTable").Select
    Range("D23").Select
    Selection.ShowDetail = True
    Sheets("PivotTable").Select
    Range("E23").Select
    Selection.ShowDetail = True
    Sheets("PivotTable").Select
    Range("F23").Select
    Selection.ShowDetail = True
End Sub
 

Attachments

  • Screenshot (33).png
    Screenshot (33).png
    50.6 KB · Views: 5

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,136,969
Messages
5,678,875
Members
419,787
Latest member
juanam

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
Top