Excel Group Rows Shortcut: How to Collapse and Expand

How-to basics · Updated November 3, 2026

Excel Group Rows Shortcut: How to Collapse and Expand

In Excel for Microsoft 365 on Windows, select the rows you want to group and press Alt+Shift+Right Arrow. To remove the group, select its rows and press Alt+Shift+Left Arrow; the plus and minus outline buttons then let you expand or collapse the grouped detail.

How to group rows with the shortcut

Grouping adds an outline to a worksheet so you can hide and reveal a block of detail rows without deleting data. Use this sequence in Excel for Microsoft 365 on Windows:

  1. Click the row number of the first row in the detail block, then drag down the row headers to select the other rows. For example, select rows 5 through 8 by dragging across their row numbers.
  2. Press Alt+Shift+Right Arrow.
  3. When Excel displays an outline control, click the minus button to hide the selected rows. Click the plus button to show them again.

For a multi-select, the rows should form one continuous block. If you select cells rather than row headers, Excel may use the selected range to infer whether you intend to group rows or columns, or show a Group dialog. Selecting the row numbers makes the intention clear. You can also select a cell within the block and use the ribbon command Data > Outline > Group; if Excel asks what to group, choose Rows.

What the shortcut does—and what it does not do

The shortcut creates an outline level around the selected rows. It does not remove or rearrange the rows, change their values, or create a filter. Collapsing a group simply hides its detail rows from view; expanding it displays them again. Formulas that refer to hidden rows remain in the worksheet, and hiding rows with an outline is different from deleting them.

Once a group exists, Excel places outline controls beside the row numbers. A minus sign collapses that group, while a plus sign expands it. Numbered outline buttons, usually shown above the row numbers, control how many detail levels are displayed at once. If the controls are missing, the group may still exist; check the outline settings and worksheet view before creating the group again.

This feature is useful for reports that have a summary row and supporting detail, such as monthly sales by transaction, project budgets by line item, or department totals by employee. A reader can keep the summary visible and open only the section that needs inspection.

Choosing rows and arranging summary lines

Group the detail rows, not the total row you want to keep visible. For example, if row 4 contains a heading, rows 5–8 list transactions, and row 9 contains a total, select rows 5–8 and group them. The total remains outside the group, so it stays on screen when the details are collapsed. This layout makes the summary easy to read and prevents a total from disappearing with its supporting data.

Excel’s outline settings determine whether summary rows are expected below or above detail. The default arrangement commonly places a summary below the detail. If your worksheet puts totals above the rows they summarize, open the Data tab and use the small dialog-box launcher in the Outline group to view outline settings; clear Summary rows below detail when appropriate. The exact appearance depends on the sheet’s structure, so check which rows collapse before applying the setting to an established report.

Before grouping, consider these practical choices:

  • Use a single group for one block of related detail, such as a month’s transactions.
  • Keep headings and totals outside the selection if they should remain visible when the detail is hidden.
  • Use nested groups when the data has natural levels, such as transactions within months and months within quarters.
  • Check the row numbers before using the shortcut; an off-by-one selection can hide a heading or a total unexpectedly.

Creating nested groups and using outline levels

Excel can display multiple levels of grouped detail. For instance, a report could have transaction rows within each month and monthly rows within a quarter. First group each month’s transaction rows. Then select the complete set of monthly rows, including the monthly summary rows that belong inside the quarter, and group that larger block. The outer group can collapse the quarter’s contents, while the inner groups control individual months.

The outline-level buttons provide a quick way to show a chosen level across the worksheet. In a simple two-level outline, clicking level 1 can show only the highest-level summaries, while level 2 reveals the next level of detail. The exact result depends on how many levels have been created and which rows are outside the groups. Use the plus and minus controls when you want to open or close one particular group rather than changing the view of all groups at that level.

Nested outlines are most useful when the summary structure is consistent. If rows are grouped irregularly or summary rows fall inside the wrong group, the level buttons may produce a view that is hard to interpret. Plan the hierarchy first, then group the smallest detail blocks before grouping the larger sections around them.

Ungrouping rows and changing the outline

To remove a group while keeping all its data, select the grouped rows and press Alt+Shift+Left Arrow. You can also use Data > Outline > Ungroup. If Excel presents a choice, specify Rows. Ungrouping removes the outline structure; it does not delete the selected rows or their contents.

To remove all outline groups from a worksheet, use Data > Outline > Ungroup > Clear Outline, where that command is available in the current Excel ribbon. This is broader than ungrouping one selection: it clears the outline structure for the sheet. Expand the groups and check the worksheet first if you are unsure which details are hidden. Clearing an outline does not erase the cell data.

If you only need to show the hidden rows temporarily, click the plus control or use the outline-level buttons instead of ungrouping. This preserves the structure for the next time you want to collapse the report. Conversely, if rows are hidden manually rather than grouped, the outline buttons will not appear for them; use the row headers and Excel’s Unhide command to reveal manually hidden rows.

Windows, Mac, and Excel for the web

On Windows desktop Excel, the row-grouping shortcut is Alt+Shift+Right Arrow, and the ungrouping shortcut is Alt+Shift+Left Arrow. On Excel for Mac, use Option+Shift+Right Arrow to group and Option+Shift+Left Arrow to ungroup. Keyboard layouts and macOS settings can affect key combinations, so the ribbon command is a reliable alternative: open Data, then choose Group or Ungroup in the Outline area.

Excel for the web may have different keyboard behavior depending on the browser and the shortcuts it reserves. If the desktop combination does not work there, select the rows and use the grouping command on the Data tab if it is available in your web version. For a workbook with complex nested outlines, desktop Excel offers a more familiar environment for managing the outline controls and settings.

Common shortcut problems

If pressing the shortcut appears to do nothing, check the selection and the current editing state before trying random key combinations. These are common causes:

  • A cell is being edited: Press Enter or Esc to leave cell-edit mode, then select the rows and try again.
  • The wrong direction key was used: Right Arrow creates a group; Left Arrow removes one. The Shift and Alt keys are also required on Windows.
  • Only a single cell is selected: Select the intended row headers, or use the ribbon command and specify Rows if prompted.
  • The rows are already grouped: Look for a minus button or outline level control. The shortcut creates a group; it is not the way to collapse one.
  • The controls are hidden: In Excel options, check the display setting for outline symbols when an outline is applied. The setting is under File > Options > Advanced, in the display options for the current worksheet.
  • The sheet is protected or shared in a restricted setup: Worksheet protection or workbook permissions may prevent structural changes. Check whether you have permission to edit the sheet before troubleshooting the key combination.

Also distinguish a row group from a worksheet-tab group. Grouping rows creates an outline within one sheet. Grouping worksheet tabs means selecting multiple sheet tabs so an edit can affect several sheets; it is a different feature with different consequences. If multiple tabs are selected, check the tab labels before editing so that a change is not unintentionally applied across sheets.

Grouping versus hiding, filtering, and tables

Grouping is a good fit when a report has stable sections that readers should be able to collapse and reopen. Manual hiding is simpler for a one-off display change, but it does not create the same plus/minus outline controls. Filtering is better when readers need to show rows that meet changing criteria, such as a particular salesperson or a date range; a filter dynamically displays matching records rather than organizing fixed sections into outline levels.

Excel tables are useful for structured records, sorting, filtering, and automatically extending formulas, but a table is not the same thing as an outline group. A table’s filter arrows do not create row-group controls. A worksheet can contain a table and an outline, but consider whether the fixed row hierarchy is still useful alongside the table’s sorting and filtering behavior. If sorting changes the order of detail rows, verify that the outline still matches the intended sections.

For a simple report where the only goal is to hide detail beneath a summary, grouping is often the clearest choice. For data exploration, filtering is usually more flexible. Neither feature changes the underlying values simply by hiding rows, but hiding can affect what a casual viewer sees, so label summaries clearly and avoid treating a collapsed view as proof that omitted records do not exist.

Frequently Asked Questions

What is the shortcut to group rows in Excel?
In Excel for Microsoft 365 on Windows, select the rows and press Alt+Shift+Right Arrow. On Mac, the equivalent is Option+Shift+Right Arrow.

How do I collapse grouped rows in Excel?
Click the minus sign beside the grouped rows. To collapse several outline sections to a particular level, use the numbered outline buttons above the row numbers.

How do I expand grouped rows again?
Click the plus sign beside the collapsed group, or choose a higher outline level to reveal more detail. Expanding shows the existing rows; it does not undo the group.

Why is Alt+Shift+Right Arrow not working?
Make sure you are not editing a cell, select the row headers for the detail block, and use the Windows key combination with both Alt and Shift held down. If it still fails, try Data > Outline > Group and choose Rows if Excel asks.

Does grouping rows delete or change their data?
No. Grouping creates an outline, and collapsing it hides detail rows from view. The contents remain in the worksheet and become visible again when you expand the group.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.