In Excel for Microsoft 365 on Windows, select the rows or columns you want to collapse and press Alt+Shift+Right Arrow to group them. To remove a group, select it and press Alt+Shift+Left Arrow. Grouping creates an outline that lets you hide and reveal details without deleting the data.
The Excel group shortcut and what it does
The group shortcut applies to selected rows or columns on the active worksheet. For example, select rows 5 through 9 by dragging over their row numbers, then press Alt+Shift+Right Arrow. Excel adds outline controls beside the row numbers, including a minus button that collapses those rows. Click the resulting plus button to show them again.
To group columns, select their column letters instead. Select columns C through F, for instance, and use the same shortcut; Excel adds outline controls above the column headings. The shortcut does not combine cells, merge data, or create a formula. It changes how the selected worksheet structure can be displayed.
- Group: Alt+Shift+Right Arrow on Windows.
- Ungroup: Alt+Shift+Left Arrow on Windows.
- Group on Mac: Shift+Option+Right Arrow.
- Ungroup on Mac: Shift+Option+Left Arrow.
These shortcuts are useful when you work with a detailed report but regularly need a compact view. You can leave supporting rows or columns in place, collapse them for a summary, and expand them whenever you need to inspect the underlying figures.
How to select the right rows or columns
Selection matters because grouping follows the worksheet structure. To select complete rows, click the first row number and drag to the last one, or click the first row number, hold Shift, and click the last. To select columns, use the column letters in the same way. Then press the group shortcut. Selecting the headers makes it clear whether Excel should create a row outline or a column outline.
If you select ordinary cells rather than entire row or column headers, Excel may open a Group dialog. Choose Rows or Columns in that dialog and confirm. The choice depends on which direction you want to collapse; it is not a command to group the selected cells into one cell. When the intended direction is clear, selecting the row numbers or column letters is usually the most direct approach.
For a reliable result, select one continuous block of rows or columns. A monthly report might have its detail in rows 6 through 17 and a subtotal below it. Select only the detail rows if the subtotal should remain visible when the group is collapsed. If the subtotal is included in the selection, it will be hidden too, which may make the collapsed summary less useful.
Grouping from the ribbon
You can use the ribbon if you do not remember the keyboard shortcut or if a keyboard layout makes it awkward. Select the rows or columns, then choose Data > Outline > Group. To remove the selected outline grouping, use Data > Outline > Ungroup. The Group command can also bring up a dialog asking whether you mean rows or columns when your selection does not make the direction obvious.
The ribbon is also a practical fallback when keyboard input is intercepted by another application or when you are using Excel in a browser. In Excel for the web, command availability and keyboard behavior can depend on the browser and the current Excel interface. If the shortcut does not work there, use the Data tab and look for the grouping command rather than assuming that the workbook cannot contain outlines.
Grouping is a worksheet-level display and organization feature. It is separate from filtering, which displays records matching criteria, and from hiding rows manually. An outline gives you explicit expand-and-collapse controls and can organize multiple levels of detail in a report.
What the outline controls mean
After a group is created, Excel shows outline symbols along the edge of the worksheet. A minus sign collapses a visible group; a plus sign expands it. Numbered outline-level buttons, usually shown above the row numbers or beside the column headings, let you display a broader level of detail at once. The precise symbols you see depend on the groups and outline levels in that sheet.
Collapsing a group hides its rows or columns from view, but does not remove their contents. Formulas that refer to those cells continue to refer to them. For example, collapsing a set of expense-detail rows does not turn those expenses into zero or remove them from a total formula. This is why grouping can make a long report easier to navigate without changing the underlying calculations.
It is also different from a filter: collapsed rows are hidden because they belong to a group, not because they failed a filter condition. A grouped report can still be filtered, but the two features control visibility for different reasons. If a row appears missing, check both the outline controls and any active filters before concluding that the data was deleted.
Building nested groups for reports
Groups can represent more than one layer of detail. Imagine a yearly sales report with transaction rows arranged beneath monthly subtotals, and monthly subtotals arranged beneath quarterly totals. You can group the transaction rows for each month, then group the monthly sections for each quarter. The resulting outline lets a reader move from transaction detail to monthly or quarterly summaries.
Plan the worksheet layout before adding these levels. Keep each detail block together and put its subtotal where it will remain visible when the detail is collapsed. Then create the smaller, inner groups first and the larger, outer groups afterward. The level buttons let you show the broad summary or reveal more layers, while each plus or minus control operates on its own group.
Excel also has an automatic outlining feature for some worksheets with a recognizable summary structure. However, automatically generated outlines depend on how the data and formulas are arranged, so they may not match a custom report exactly. For a predictable result, manually select and group the intended blocks. If the sheet becomes confusing, use Data > Outline > Clear Outline to remove outline structure from the worksheet, then create the groups again as needed. Clearing an outline is different from deleting worksheet rows or values.
Common grouping problems and fixes
- The shortcut does nothing: Confirm that Excel is the active window and that you selected row numbers or column letters, not just a cell. Try the ribbon command to distinguish a selection issue from a keyboard issue.
- Excel asks whether to group rows or columns: That is a prompt to specify the outline direction. Choose the intended option, or cancel and select the row or column headers directly.
- The wrong information disappears: Expand the group, select the intended rows or columns more precisely, and regroup. A subtotal included inside the selection will be hidden along with detail.
- Outline buttons are not visible: On Windows, Ctrl+8 toggles the display of outline symbols. It affects whether the controls are shown, not whether the groups or their data have been removed. Check that the worksheet is not protected in a way that prevents the change.
- Rows seem to be missing after expanding: Check for filters, manually hidden rows, and nested groups. Expanding one level may not reveal every detail if another level remains collapsed.
When you use Ungroup, select the rows or columns that belong to the grouping you want to remove. If groups are nested, removing one level may leave another level in place. The worksheet’s outline controls can help you see which level is still active. Use Clear Outline only when you want to remove the worksheet’s outline groupings broadly, rather than simply expand a group.
Windows, Mac, and web differences
The Windows shortcuts in this guide apply to Excel for Microsoft 365 on Windows: Alt+Shift+Right Arrow groups, and Alt+Shift+Left Arrow ungroups. In Excel for Mac, the corresponding shortcuts use Option instead of Alt: Shift+Option+Right Arrow to group and Shift+Option+Left Arrow to ungroup. On a Mac keyboard, Option is sometimes labeled Alt, but the key functions as Option in macOS shortcuts.
Keyboard shortcuts can be affected by the operating system, keyboard layout, or other software. If the Mac shortcut is unavailable or behaves differently, select the range and use Data > Group or the equivalent Group command on the Data tab. Excel for the web also has a ribbon route, while shortcut support can vary with the browser. A ribbon command is the simplest cross-platform way to confirm that you are invoking Excel’s grouping feature.
Frequently Asked Questions
What is the shortcut to group rows in Excel?
On Windows, select the row headers and press Alt+Shift+Right Arrow. On Mac, use Shift+Option+Right Arrow. The same shortcut works for columns when you select the column headers.
How do I ungroup rows in Excel?
Select the grouped rows and press Alt+Shift+Left Arrow on Windows, or Shift+Option+Left Arrow on Mac. You can also choose Data > Outline > Ungroup.
Does grouping rows delete or change their data?
No. Grouping lets you collapse rows or columns from view; it does not delete their contents. Formulas can continue to reference the hidden data.
Why does Excel show a Group dialog instead of grouping immediately?
Excel may need you to specify whether the selection should be grouped as rows or columns, particularly when you selected cells rather than entire row or column headers. Choose the intended direction in the dialog.
How do I show the plus and minus outline buttons again?
On Windows, press Ctrl+8 to toggle outline symbols. If they still do not appear, check whether the worksheet has an outline and whether the current selection or sheet state is affecting what is visible.
Is grouping the same as hiding rows?
No. Hiding a row conceals it, but grouping adds outline controls for expanding and collapsing structured detail. Grouping is often easier to manage in reports that need repeatable summary and detail views.
Related
- How to Enable Solver in Excel on Windows and Mac
- Flash Fill in Excel: Keyboard Shortcut and How to Use It
- Autofill in Excel From Another Cell: A Practical Guide
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Keyboard Shortcuts: Settings and CustomizationExcel for Microsoft 365 on Windows does not provide one settings page where you can remap every built-in…
- Excel Bullet Point Shortcut: Windows, Mac, and WebIn Excel for Microsoft 365 on Windows, press Alt+7 on the numeric keypad to type a bullet (•)…
- Upper Excel Shortcut: How to Capitalize TextExcel has no built-in keyboard shortcut that turns the selected cell’s text into uppercase. With the text maria…
- Copy Excel to Word Without Losing FormattingTo copy Excel cells into Word without losing their appearance, select the range in Excel, press Ctrl+C, then…
- How to Lock Cells in Excel While Scrolling a WorksheetTo keep headings or columns visible while you scroll in Excel for Microsoft 365 on Windows, select the…
- Excel Conditional Formatting for Yes/No Red and GreenYes—Excel can automatically color “Yes” green and “No” red with conditional formatting. For a status list in B2:B100,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.