Cellwise Start free

Rows, columns and sheets shortcuts

Group rows and columns shortcut in Excel

Quick answerOn a Mac, select the rows and press CommandShiftK to group or CommandShiftJ to ungroup. On Windows, use Data > Group; Microsoft's current list has no group key, though many people use AltShiftRight arrow (group) and AltShiftLeft arrow (ungroup), which work in current Excel for Windows. Then AltShift- hides a group's detail and AltShift= shows it.

The keys

ShortcutWindowsMac
Group the selected rows or columnsMicrosoft's Windows list has no key for this; use Data > Group.—No Windows shortcut in Microsoft's listCommandShiftK
Ungroup the selected rows or columnsMicrosoft's Windows list has no key for this; use Data > Ungroup.—No Windows shortcut in Microsoft's listCommandShiftJ
Show the detail of a groupNot in Microsoft's Mac list.AltShift=—No Mac shortcut in Microsoft's list
Hide the detail of a groupNot in Microsoft's Mac list.AltShift-—No Mac shortcut in Microsoft's list
Show or hide the outline symbolsCtrl8Control8

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 ShiftSpace and ShiftDown 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

When grouping does not work

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 CtrlShift$, 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

ShortcutWindowsMac
Hide the selected rows How to: Shortcuts to hide and unhide rows and columns in Excel Ctrl9Control9 or Command( or Control(
Select the entire row How to: Insert row shortcut in Excel ShiftSpaceShiftSpace
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

Related functions

In the glossary: SUBTOTAL

All rows, columns and sheets shortcutsAll Excel shortcutsPrintable sheet