Pivot Table: Expand/collapse all rows using keyboard shortcut
In an Excel 2016 pivot table:
Is there a keyboard shortcut we can use to expand or collapse all rows at a given level? For example, CTRL + click the plus sign to expand all rows?
I'm aware that it's possible to expand/collapse all -- using the mouse and the right click menu. But I'm wondering if there is a way to do it a bit quicker with a keyboard shortcut, as is often the case with expanded trees in other software.
3 Answers
You can use a combination of your keyboard and mouse to accomplish it.
- To expand, press Shift and scroll UP with the mouse wheel
- To collapse, press Shift and scroll DOWN with the mouse wheel
Source: Excel Pivot Table Shortcut to Expand and Collapse
As far as I know their is no single press keyboard shortcut for this, though you can use chained keyboard shortcuts.
Select the relevant field.
Press in order (not together)
- altAJ to expand all
- altAH to collapse all
To only expand/collapse a single requires a bit of a cheat. You need the menu button ≣ which functions like a right-click. If your keyboard doesn't have one, press shiftF10.
- ≣EX to expand single field
- ≣EO to collapse single field
- ≣EE to expand all
- ≣EC to collapse all
You can use:
Expand: Shift+Scroll up
Collapse: Shift+Scroll down