How to Group Rows in Excel: Outline and Collapse Sections

Grouping rows creates a collapsible outline beside the row numbers. It lets you fold detail rows out of view without deleting or permanently hiding them.

Does this affect you?

Use this for Excel for Microsoft 365, Excel 2021, and Excel 2019 on Windows or Mac when a sheet has long detail sections that should collapse under summary rows.

Group rows manually

Use this when you want to decide exactly which rows belong together.

  1. Select the row numbers for the detail rows.
  2. Open the Data tab.
  3. Click Group in the Outline section, or use Shift+Alt+Right Arrow on Windows.
  4. A bracket and minus button appear beside the selected rows.
  5. Click the minus button to collapse the group.
  6. Click the plus button to expand it again.

Group rows automatically from summary formulas

Auto Outline works when the sheet already has subtotal or total formulas.

  1. Make sure summary rows contain formulas such as SUM that reference nearby detail rows.
  2. Click inside the data range.
  3. Open Data > Group and use the dropdown under Group.
  4. Choose Auto Outline.
  5. Review the groups Excel created.

More control

Create nested groups

Select a smaller set of rows inside an existing group and run Group again. Excel creates another outline level for subsections, such as days inside weeks.

Use outline level buttons

The numbered buttons at the top-left of the outline margin collapse or expand levels at once. Click 1 for top-level summary; click the highest number to show all detail.

Group columns too

Select column letters and use Data > Group to collapse groups of columns, such as months inside quarters.

Remove grouping

Select grouped rows and use Data > Ungroup to remove one level, or use Clear Outline to remove all grouping from the sheet.

Sources

  • Microsoft Support – Group or ungroup rows or columns in a worksheet (2025)
  • Microsoft Support – Create an outline of your worksheet data (2025)
  • Microsoft Support – Subtotal function (2024)
Disclosure: This post may contain affiliate links which means I may receive a commission for purchases made through links. I will only recommend products that I have personally used! Learn more on my Private Policy page.
A thoughtful woman reads a newspaper while enjoying coffee at an indoor workspace.

DEALWEEK

SUBSCRIBE AND GET 20% OFF YOUR NEXT ORDER! OFFER ENDS SOON - DON’T MISS OUT!

We don’t spam! Read our privacy policy for more info.

Shopping Cart