Rows, columns and sheets shortcuts
Group rows and columns shortcut in Excel
The keys
| Shortcut | Windows | Mac |
|---|---|---|
| Group the selected rows or columnsMicrosoft's Windows list has no key for this; use Data > Group. | —No Windows shortcut in Microsoft's list | Command+Shift+K |
| Ungroup the selected rows or columnsMicrosoft's Windows list has no key for this; use Data > Ungroup. | —No Windows shortcut in Microsoft's list | Command+Shift+J |
| Show the detail of a groupNot in Microsoft's Mac list. | Alt+Shift+= | —No Mac shortcut in Microsoft's list |
| Hide the detail of a groupNot in Microsoft's Mac list. | Alt+Shift+- | —No Mac shortcut in Microsoft's list |
| Show or hide the outline symbols | Ctrl+8 | Control+8 |
Checked against Microsoft's official lists on . Where Microsoft lists a key for one platform only, the other column says so instead of guessing.
Group whole rows, not cells
Select entire rows first with Shift+Space and Shift+Down arrow. With only cells selected, Excel asks whether to group rows or columns; whole rows skip the question.
Leave the summary row outside the group. Group the detail rows under a total, so collapsing the group leaves the total showing.
Open and close groups from the keyboard
- Alt+Shift+- hides the detail of the group the active cell is in, and Alt+Shift+= shows it again (Windows, from Microsoft's outline page).
- Ctrl+8 shows or hides the outline symbols (the 1 2 3 buttons and the plus and minus signs) on both platforms.
- With the mouse on Windows, hold Shift and scroll over a group to expand or collapse it.
When grouping does not work
- Group is greyed out: a cell is being edited, or several sheets are selected (Group shows in the title bar).
- The outline symbols are missing: they are hidden. Press Ctrl+8.
- Data > Subtotal makes its own outline. Remove it with Data > Subtotal > Remove All before grouping by hand.
Why a shortcut sometimes does nothing
Non-US keyboards
Microsoft's lists are written for the US keyboard layout and say that keys on other layouts might not correspond exactly. Shortcuts named after a symbol, such as Ctrl+;, Ctrl+` or Ctrl+Shift+$, are the ones most likely to sit somewhere else or not work. When one does nothing, use the ribbon route on its task page instead.
Related shortcuts
| Shortcut | Windows | Mac |
|---|---|---|
| Hide the selected rows How to: Shortcuts to hide and unhide rows and columns in Excel | Ctrl+9 | Control+9 or Command+( or Control+( |
| Select the entire row How to: Insert row shortcut in Excel | Shift+Space | Shift+Space |
| Expand or collapse grouped rows with the mouse wheelNot in Microsoft's Mac list. Hover over the group, hold Shift, and scroll down to expand or up to collapse. | Shift | —No Mac shortcut in Microsoft's list |
FAQ
What is the shortcut to group rows in Excel?
Cmd+Shift+K on a Mac. On Windows, Alt+Shift+Right arrow is widely used and works in current versions, though Microsoft's current shortcut list does not include it.
How do I ungroup rows?
Select them and press Cmd+Shift+J on a Mac, or Alt+Shift+Left arrow on Windows, or use Data > Ungroup.
Is grouping better than hiding?
For sections people open and close, yes: the plus and minus buttons show that something is folded away. Hidden rows are easy to miss.
Related guides
- Formulas for a monthly budget in ExcelA working monthly budget needs four formulas: Remaining =C2-D2 (budget minus actual) for each category, a total with =SUM(D2:D10), money left with =F2-SUM(D2:D10) (take-home pay minus spending), and group totals with =SUMIF(B2:B10,"Wants",D2:D10).
- How to create a pivot table in ExcelClick any cell in your data and go to Insert > PivotTable, then click OK.
Related functions
In the glossary: SUBTOTAL
All rows, columns and sheets shortcutsAll Excel shortcutsPrintable sheet