Excel Group Rows Shortcut: The Key and How It Works

How-to basics · Updated November 21, 2026

In Excel for Microsoft 365 on Windows, select the rows you want to group and press Alt+Shift+Right Arrow. Excel adds an outline control so you can collapse those rows and expand them again; to remove the group, select it and press Alt+Shift+Left Arrow.

The Windows shortcut and what it does

The shortcut creates an outline group: it does not delete the selected rows or combine their contents. When you collapse the group, Excel hides its detail rows temporarily and shows an outline button—usually a plus sign—to expand them. The rows and their values remain in the worksheet.

For example, imagine a monthly report with a total in row 2 and transaction details in rows 3 through 8. Select rows 3 through 8, then press Alt+Shift+Right Arrow. The detail rows can now be folded away while the total remains visible, making the report easier to scan. Expand the group when you need to inspect the underlying entries.

The shortcut is useful when you are building or updating an outline repeatedly. It works on a selected row range, and Excel can also group columns using the corresponding column selection. If the selection is ambiguous—for example, you selected cells rather than complete row headers—Excel may ask whether to group rows or columns.

Select the right rows before grouping

To make the result predictable, select the row numbers along the left edge of the worksheet. For a continuous group, click the first row number and drag to the last, or click the first row number, hold Shift, and click the last. Then use the shortcut. You can also select a row and extend the selection with the keyboard.

Choose detail rows, not the summary row you want to keep visible. In a simple layout, that means selecting the rows containing the individual records while leaving a heading or subtotal outside the selection. If the report has a subtotal at the bottom of each section, grouping the detail rows above that subtotal lets the subtotal remain on screen when the details are collapsed.

  • One group: select one contiguous block of detail rows, then press Alt+Shift+Right Arrow.
  • Separate groups: create each block separately rather than including unrelated rows between them.
  • Nested groups: group smaller detail blocks first, then select a larger surrounding block to create a higher outline level.

Grouping does not require the rows to contain formulas or a particular kind of data. However, a clear layout—with detail rows next to their corresponding labels or totals—makes the outline much more useful.

Use the ribbon if the shortcut is inconvenient

The same command is available from the ribbon in Excel for Microsoft 365 on Windows. Select the rows, open Data > Outline > Group, and choose Rows if Excel asks what to group. The menu route is a practical fallback if a laptop keyboard makes the arrow-key combination awkward or another program intercepts the shortcut.

For removing an outline group, select its rows and choose Data > Outline > Ungroup. If Excel asks, choose Rows. The ribbon is also useful when you cannot remember the shortcut or want to confirm that you are applying the command to rows rather than columns.

Grouping is reversible, but do not confuse ungrouping with deleting rows. Ungroup removes the outline structure and leaves the worksheet data in place. If you have just created the group and want to undo that action, Ctrl+Z also reverses it; it is not necessary to delete or clear the selected cells.

Collapse, expand, and navigate outline levels

After grouping, Excel displays outline symbols beside the row numbers. Select the minus symbol to collapse a group and the plus symbol to expand it. Buttons numbered 1, 2, and sometimes higher appear near the top-left of the sheet when there are multiple outline levels. Selecting a number displays the corresponding level of detail across the outline.

In a basic outline, level 1 generally shows the most summarized view, while level 2 reveals the next level of detail. If you have nested groups, higher levels reveal progressively more rows. This is faster than opening each group one at a time when a sheet contains many sections.

Collapsing a group only changes what is displayed. It does not remove the hidden rows from calculations or erase their content. Be aware that a manually hidden row can look similar to a collapsed detail row, but it is not necessarily part of an outline group. Use the plus and minus symbols or the outline-level buttons to tell whether an outline is controlling the display.

Put summary rows in the right place

Excel’s outline settings affect where summary rows sit in relation to detail. By default, the setting for summary rows below detail is enabled, which suits reports where a subtotal follows its entries. If your totals are above the detail rows, you may need to change the setting before grouping so that the summary stays visible in the intended position.

To review it in Windows Excel, open the dialog box launcher in the Data tab’s Outline group, then inspect Summary rows below detail in the Settings dialog. Clear the option when your summary rows are above the detail. This setting changes how Excel treats summaries for outlining; it does not move worksheet rows or calculate totals for you.

Plan the layout before creating several levels of groups. For instance, a department report might have transaction rows, department subtotals, and a grand total. Group the transactions within each department, then use an outer group for a larger section if that structure is useful. Keep labels and totals outside the detail range they summarize so they remain visible when that range is collapsed.

Fix common shortcut problems

  • Nothing happens: confirm that Excel is active and that a row range is selected. Try the ribbon command at Data > Outline > Group to distinguish a keyboard issue from a selection or worksheet issue.
  • Excel groups columns instead: select the row headers rather than a range that makes the intended direction unclear. If a dialog appears, choose Rows.
  • The outline buttons are missing: check whether outline symbols are hidden for that worksheet. In Windows, look under File > Options > Advanced > Display options for this worksheet and enable Show outline symbols if an outline is applied.
  • The wrong rows disappear: expand the group, check its selected row range, and ungroup it before creating the correct group. A collapsed group hides rows; it does not remove them.
  • The shortcut is intercepted: keyboard layouts, laptop function keys, remote desktops, and other software can affect key combinations. Use the ribbon command instead of repeatedly pressing keys and risking a different action.

If the sheet is protected, some structural changes may be restricted depending on the protection settings. If Group is unavailable or produces a warning, check whether the worksheet is protected and whether you have permission to change its outline. Also consider whether the workbook is in a state that restricts editing, such as read-only access.

Mac and Excel for the web

In Excel for Mac, the corresponding shortcuts are generally Option+Shift+Right Arrow to group and Option+Shift+Left Arrow to ungroup. Mac keyboards label the Option key with the Option symbol or the word Option. If a shortcut conflicts with a system or keyboard setting, use the Data tab’s Group or Ungroup command instead.

In Excel for the web, keyboard shortcuts may vary with the browser and operating system, and a browser can capture a combination before Excel receives it. Use the Data tab’s Group command when the shortcut does not work; choose the row option if Excel presents a choice. The command is more dependable than assuming every desktop shortcut behaves identically in a browser.

Grouping compared with hiding and filtering

Grouping is best when readers should be able to reveal and conceal a planned section of a report. It adds visible outline controls and supports nested levels. Manually hiding rows also conceals information, but does not provide the same organized outline controls, so it is less convenient for a report people will regularly expand and collapse.

Filtering serves a different purpose. A filter shows records that match criteria, such as one department or one date range; it does not create a fixed outline around chosen blocks of rows. Use grouping for a structured summary-and-detail view, filtering to find matching records, and manual hiding for a temporary display change. These features can be used in the same worksheet, but each changes visibility in a different way.

Frequently Asked Questions

What is the shortcut to group rows in Excel?
On Windows, select the rows and press Alt+Shift+Right Arrow. On Mac, use Option+Shift+Right Arrow. If the shortcut is unavailable, select the rows and use Data > Outline > Group in Windows Excel.

How do I ungroup rows in Excel?
Select the grouped rows and press Alt+Shift+Left Arrow on Windows, or Option+Shift+Left Arrow on Mac. You can also use Data > Outline > Ungroup. Ungrouping removes the outline but keeps the rows and their contents.

How do I collapse or expand grouped rows?
Click the minus symbol beside a group to collapse it and the plus symbol to expand it. The numbered outline buttons control how much detail is displayed across the worksheet.

Can I group rows without selecting the row numbers?
Often Excel can infer the direction from selected cells, but a cell selection can be ambiguous and may prompt you to choose rows or columns. Selecting the row headers is the clearest method.

Why can’t I see the plus and minus buttons?
The outline symbols may be hidden, or the rows may not have been grouped successfully. Check the worksheet’s outline-symbol display option, then use the Data tab’s Group command to create or verify 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.