Expand/Collapse Entire Field - Pivot Table - Shortcut

Sundance_Kid

Board Regular
Joined
Sep 2, 2017
Messages
155
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a pivot table with 4 fields in the rows section and one field in the values section.

I am displaying the table in tabular form.

Is there a user friendly shortcut way to quickly expand/collapse the entire table without having to right click the first row and go to Expand/Collapse?

I am ideally thinking of some shortcut button i can add either add to the excel page or to the toolbar ribbon.

Below is the table I am using as an example. To collpase the entire field I normally would right click on the first row - 'Name' go to Expand/Collapse and click Collapse All.

Thank you
Expand_Collapse Query.PNG
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I usually right-click, then press on keyboard: "E E" to expand all, or "E C" to collapse.
Thanks, I was hoping for something with less steps then even that.

Being able to just click once a button saying expand or collapse.

Is there some sort of macro that can be added with two buttons - one for expand and one for collapse?

Thanks
 
Upvote 0
Yes, you can certainly build in a macro. On Developer tab, click on Start Recording then go through the clicks you would make to expand or collapse. Then click on Stop Recording. You will need to make 2 recordings for the Expand vs Collapse actions.
After this, again on Developer tab, click on Insert > Button, then assign the respective Marco to the button. You can rename the buttons.
 
Upvote 0
Yes, you can certainly build in a macro. On Developer tab, click on Start Recording then go through the clicks you would make to expand or collapse. Then click on Stop Recording. You will need to make 2 recordings for the Expand vs Collapse actions.
After this, again on Developer tab, click on Insert > Button, then assign the respective Marco to the button. You can rename the buttons.
Many thanks for your reply. I may look into doing this later, I have yet to build a macro before but this may be a good starting point for my first build.

Thanks
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

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