keepcalculator

06 Numbers and Powers

Shortcuts to Group, Ungroup, and Outline in Excel

Card No. 06·56438 · Updated · Standard formula, shown below

In Excel, use Ctrl+G to group selected rows or columns, Ctrl+Shift+G to ungroup them, and Alt+Shift+Right Arrow or Alt+Shift+Left Arrow to create or remove an outline level. These shortcuts work in the desktop Excel app on Windows; on Mac, use the menu commands because keyboard mappings can differ.

What the shortcuts do

Excel uses two related features for organizing worksheets: grouping and outlining. Grouping creates collapsible sections of rows or columns, while an outline is the hierarchy Excel displays through level buttons and expand or collapse controls. Grouping rows or columns usually creates or updates that outline automatically.

  • Group rows or columns: Select the rows or columns, then press Alt+Shift+Right Arrow. In many Windows Excel versions, Alt+A, G, G is also a Ribbon key sequence for Data > Group.
  • Ungroup rows or columns: Select the grouped rows or columns, then press Alt+Shift+Left Arrow. The Ribbon sequence is commonly Alt+A, U, U for Data > Ungroup.
  • Show or hide outline symbols: Use the outline controls near the row and column headings, or open Data > Outline. Excel does not have one universal shortcut that toggles every outline display setting across versions.

Key-tip sequences can vary with Ribbon layout, language, and Excel version. If a sequence does not work, use the Data tab and check the displayed key tips rather than assuming the selection or worksheet is broken.

How to group rows or columns

First select the worksheet rows or columns you want to collapse together. To select entire rows, click their numbered headings; for columns, click their lettered headings. For example, selecting rows 5 through 12 and choosing Data > Group makes those rows a collapsible section. Selecting cells within a range may also work, but selecting complete rows or columns makes the intended scope clear.

  1. Arrange the detail rows or columns next to each other. A group represents a contiguous range.
  2. Select the row or column headings for the range.
  3. Press Alt+Shift+Right Arrow, or choose Data > Group.
  4. If Excel asks whether to group rows or columns, choose the correct direction.
  5. Use the minus control beside the row numbers or above the column letters to collapse the group; use the plus control to expand it.

When you group detail rows, Excel normally leaves the adjacent summary row visible. If the summary row is above the detail rather than below it, the outline setting for summary rows can affect which rows remain visible. Find this setting through the small dialog launcher in the Data tab’s Outline area, then adjust the direction as needed.

How to ungroup and remove an outline

To remove just one grouping level, select the rows or columns that belong to that group and choose Data > Ungroup or press Alt+Shift+Left Arrow. Ungrouping does not delete the worksheet data; it removes the collapsible structure. If several groups overlap or nest, check the selection carefully so you remove the intended level.

To remove every outline grouping from a sheet, use Data > Ungroup > Clear Outline. This is different from ungrouping a selected range: Clear Outline removes the outline structure throughout the worksheet. It does not erase cell values or formulas, but it also cannot be undone by simply expanding a group after the structure has been cleared. Save a copy first if you may need the outline later.

Outline levels and nested groups

Excel outlines can have up to eight levels. The numbered level buttons, often shown as 1, 2, 3, and so on, display progressively more detail: clicking a lower level hides more deeply grouped rows, while the highest available level shows the full detail. The precise number of buttons depends on how the outline is built.

For example, a monthly report might group daily transactions beneath each month, then group months beneath quarters. The inner groups let readers collapse individual months; an outer group can collapse an entire quarter. Build the inner groups first and then the outer groups when you want this nested behavior. Avoid grouping summary rows together with their details unless that is the intended result, as doing so can hide totals when a section collapses.

Common problems and fixes

  • The shortcut inserts or edits something instead. Confirm the active window is Excel and that the correct rows or columns are selected. Laptop function-key and keyboard layouts can also affect combinations; use Data > Group as a reliable alternative.
  • The Group command is unavailable. Check whether the worksheet is protected, whether the workbook is in a mode that restricts editing, or whether the selection is appropriate. You may need permission to change the sheet.
  • Plus and minus controls are missing. Open Excel Options, choose Advanced, and check the setting for showing outline symbols when an outline is applied. The exact location or wording can vary by Excel release.
  • Rows collapse in the wrong direction. Review whether summary rows are above or below detail rows and change the corresponding setting in the Outline dialog.
  • Ungroup seems to do nothing. Select the grouped headings, not just an unrelated cell, and verify that the selection intersects the group you want to remove.

Grouped rows are not the same as hidden rows. Hiding rows conceals them without creating an outline hierarchy; grouping gives users visible controls to expand and collapse sections. Filtering is different again: it displays rows according to criteria rather than maintaining a manually created outline.

Excel on Mac and other spreadsheet apps

Excel for Mac supports grouping and outlining, but Windows Alt-based shortcuts should not be assumed to work identically on a Mac keyboard. The dependable route is to select the rows or columns and use the commands on the Data tab. Shortcuts may depend on the version, keyboard settings, and whether a function-key modifier is required.

Google Sheets also supports grouped rows and columns, but its menu names and keyboard shortcuts are not identical to Excel’s. If you are following an Excel shortcut guide in another spreadsheet app, use that app’s menus or help to verify the equivalent command rather than treating the shortcuts as universal.

Frequently Asked Questions

What is the shortcut to group rows in Excel?
On Windows, select the rows and press Alt+Shift+Right Arrow. You can also use Data > Group.

What is the shortcut to ungroup rows in Excel?
Select the grouped rows and press Alt+Shift+Left Arrow, or choose Data > Ungroup.

How do I remove all groups in Excel?
Choose Data > Ungroup > Clear Outline. This removes outline groups from the sheet but leaves the data in place.

Why can’t I see the plus and minus buttons?
Outline symbols may be turned off in Excel’s Advanced options. Also check that the sheet actually contains a group and is not protected from changes.

Does ungrouping delete my data?
No. Ungrouping removes the collapsible structure, not the cell contents. Clear Outline likewise removes the outline, not the underlying values or formulas.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →