Excel Row Collapse Grouping: How to Group and Hide Rows

How-to basics · Updated November 18, 2026

To collapse rows in Excel, select their row numbers, then choose Data > Outline > Group and select Rows if prompted. Excel adds outline controls beside the worksheet; click the minus button to collapse the group and the plus button to show it again. Grouping hides detail temporarily without deleting it.

What Excel row grouping does

Row grouping creates an outline: a set of worksheet rows that can be shown or hidden together. It is useful when a sheet contains detail that supports a smaller summary, such as monthly transactions beneath a quarterly total or individual tasks beneath a project heading. A reader can collapse the detail to focus on the summary, then expand it when they need to inspect the underlying entries.

When a group is collapsed, Excel hides its rows from view and draws a bracket beside the row numbers. The outline level buttons, usually numbered 1, 2, and so on, appear near the upper-left corner of the sheet. They show progressively more detail: selecting a lower level generally displays more of the outline, while a higher level shows a more condensed view. The exact number of levels depends on how the rows are grouped.

Grouping is a display and navigation feature, not a way to remove data or protect it. Collapsed values remain in the workbook and can still affect formulas. If you need to prevent someone from seeing or editing information, hiding a group is not a security measure; use appropriate workbook protection or remove sensitive data instead.

How to group rows in Excel for Microsoft 365

In Excel for Microsoft 365 on Windows, group a continuous block of detail rows as follows:

  1. Click the row number of the first detail row, then drag down the row headers to select the last detail row. For example, select rows 5 through 10 if those rows contain the detail and row 11 is a total.
  2. Choose Data > Outline > Group. If Excel asks whether to group Rows or Columns, choose Rows.
  3. Look for the outline bracket and a minus button beside the selected rows. Click the minus button to collapse them.

Selecting row headers makes your intention clear and helps avoid grouping columns by mistake. You can also select cells in the rows, but Excel may ask whether the outline should apply to rows or columns. If the Group command is unavailable, check that the sheet is not protected in a way that prevents outlining and that you have selected ordinary worksheet rows.

For a Windows keyboard alternative, select the rows and press Alt+Shift+Right Arrow to group them. To ungroup a selection, the corresponding shortcut is Alt+Shift+Left Arrow. Shortcuts can be affected by keyboard layout and Excel settings. In Excel for Mac, use Data > Group if the shortcut differs or is not available; the ribbon command is the dependable option across keyboard layouts. Excel for the web may show different controls, so use the desktop app if you cannot find the outline command in your current interface.

Collapse, expand, and read outline controls

After grouping, click the minus sign beside the bracket to hide the grouped rows. The control changes to a plus sign; click it to expand the rows again. If the symbols are hard to spot, look in the margin to the left of the row numbers. The outline level buttons at the top-left let you switch the whole sheet to a particular level of detail, rather than opening one group at a time.

For example, a sheet might have detail rows 5–10 and a total in row 11. Grouping rows 5–10 lets you collapse the transactions while leaving the total visible. Clicking level 1 may show only the highest-level summary rows; clicking a more detailed level reveals more of the sheet. The result depends on the outline structure, so test the level buttons after setting up groups if the sheet has several sections.

If the brackets or plus/minus buttons are missing, the outline may be hidden rather than removed. In Excel for Windows, check File > Options > Advanced, then under Display options for this worksheet make sure Show outline symbols if an outline is applied is selected. Also check whether the relevant rows are currently hidden by another feature, and verify that the sheet actually contains a group.

Create nested groups for multiple levels

Nested grouping is useful when a worksheet has detail at more than one scale. For example, a department report might list individual transactions, then provide a subtotal for each department and a grand total for the whole report. You can group transaction rows within each department and then group the department sections together. The outline controls can then reveal a broad summary or progressively more detailed information.

To create nested groups, first group the smallest detail sections, then select the larger blocks that contain those sections and group them. Keep summary rows outside the detail rows they summarize when you want those summaries to remain visible as a section collapses. After creating the groups, try the numbered outline levels and each plus/minus control to confirm that the intended rows appear at each level.

Nested outlines are easier to use when the worksheet follows a consistent pattern: detail rows together, followed by a clearly labeled subtotal or heading. Avoid grouping unrelated sections into one large block simply because they are adjacent. A group should represent information a reader might reasonably want to hide or reveal as a unit.

Summary rows, automatic outlines, and placement

Manual grouping gives you control over exactly which rows collapse. Excel also has an Auto Outline command that attempts to infer groups from a worksheet’s layout and formulas. It can help with a regularly structured report, but it may not identify the groups you intended when the sheet has irregular sections, blank rows, or formulas that do not follow a clear pattern. Review the outline it creates before relying on it.

Excel’s outline settings determine whether summary rows are expected below or above the detail. In the Data tab’s Outline settings, the Summary rows below detail option affects how Excel treats summary placement. Many reports put subtotals after their detail, but some place them before it. If collapsing a group hides a subtotal you wanted to keep visible, review the row selection and the summary-row setting rather than assuming the total has been deleted.

For calculated summaries across a list, the Subtotal command can create subtotal rows and an outline automatically when the data is organized appropriately. That is different from simply grouping rows: Group lets you choose existing rows to collapse, while Subtotal inserts summary calculations and organizes the result. If you already have formulas or a custom report layout, manual grouping is often the more predictable choice.

Ungroup rows or remove an outline

To remove one group, select its rows and choose Data > Outline > Ungroup. If Excel asks whether to ungroup rows or columns, choose Rows. Ungrouping removes that outline relationship; it does not delete the rows or their contents. If groups are nested, you may need to ungroup the appropriate level separately.

To remove all outline groups from the worksheet, choose Data > Outline > Ungroup > Clear Outline. This removes the outline structure, not the underlying data. Use Clear Outline only when you want to discard all of the sheet’s grouping, rather than just expand everything temporarily. If you only want to see all rows again, click the plus buttons or choose the most detailed outline level instead.

Grouping versus hiding, filtering, and Subtotal

These features can all change what appears on screen, but they solve different problems:

  • Group: Creates reusable outline controls for rows that belong together. Readers can collapse and expand a section with a click.
  • Hide rows: Hides selected rows without creating a structured outline. To show them again, select the surrounding rows, right-click a row header, and choose Unhide.
  • Filter: Shows records that meet chosen criteria, such as one region or date range. Filtering is better for selecting matching records than for folding up a report section.
  • Subtotal: Adds calculated summary rows to a suitable list and can create an outline around the resulting detail. It is intended for summarized data, not just visual organization.

A common misconception is that collapsing a group changes totals or removes hidden rows from calculations. Normally, collapsing only changes visibility; it does not delete the values. Some functions, such as SUBTOTAL, can be designed to treat filtered or manually hidden rows differently depending on the function number, but that behavior is separate from the outline control itself. Check the formula and its function if a displayed total does not behave as expected.

Common problems and practical fixes

If clicking the minus sign does not collapse the rows you expect, inspect which row numbers were selected when the group was created. A summary row accidentally included in the group will disappear along with the detail. Ungroup the block and create it again with only the rows that should be hidden.

If a group collapses but the wrong summary remains visible, check whether the summary sits inside or outside the selected range and review the summary-row setting. If the controls are absent, check the outline-symbol display setting and make sure you have not cleared the outline. If grouping commands are unavailable, check worksheet protection and try selecting the row headers directly.

For a shared report, label summary rows clearly and keep related detail together. Before sending a workbook, choose the outline level that makes the first view useful, and leave a brief note if readers may not recognize the controls. Grouping changes what is visible, so verify both the collapsed and expanded views before relying on the sheet for review or printing.

Frequently Asked Questions

How do I collapse rows in Excel with a plus or minus sign?

Select the detail rows and choose Data > Outline > Group. Click the minus sign beside the outline bracket to collapse the rows; click the plus sign to expand them.

Why can’t I see the plus and minus buttons in Excel?

The outline symbols may be turned off, or the rows may not have been grouped. In Windows, check File > Options > Advanced and enable Show outline symbols if an outline is applied for the worksheet.

Can I group rows without hiding or deleting data?

Yes. Grouping adds controls that hide and reveal rows; it does not delete their contents. A collapsed group is still part of the worksheet and is not a way to secure confidential information.

How do I remove grouping but keep the rows?

Select the grouped rows and choose Data > Outline > Ungroup. To remove every group on the sheet, use Clear Outline. Both actions preserve the row contents.

Can I group rows automatically in Excel?

Excel’s Auto Outline can infer groups from some worksheet structures, but its results depend on the layout and formulas. Review the groups it creates, or use manual grouping when you need precise control over which rows collapse.

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.