Pivot Table Macro To Show Grand Totals

mayoung

Active Member
Joined
Mar 26, 2014
Messages
257
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: 7

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,213,527
Messages
6,114,148
Members
448,552
Latest member
WORKINGWITHNOLEADER

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