Yes. In Excel for Microsoft 365 on Windows, you can group rows in nested levels: select a set of detail rows and choose Data > Outline > Group, then group a larger range that contains those rows to make a parent level. Use the outline buttons beside the worksheet to collapse or expand one level at a time; Excel supports up to eight outline levels.
What multiple row groups do
Grouping creates an outline, a collapsible structure for rows that belong together. It is useful when a worksheet contains detail that readers sometimes need and sometimes want to hide: monthly transactions under a monthly total, for example, or departments under a company-wide summary. Grouping changes how rows are displayed; it does not add, calculate, or verify totals.
Each group can be collapsed to hide its rows or expanded to show them again. When groups are nested, the outline gives you more than a simple show-or-hide switch. You can reveal a high-level summary, expand to see a department or quarter, and then expand again to inspect individual records. The numbered outline buttons, usually shown at the left of the row headings, display progressively more detail. The plus and minus buttons beside a group control that particular group.
Excel allows as many as eight outline levels. That is a maximum, not a target: a short, clear hierarchy is easier to use than a worksheet with many layers. Grouping is also different from hiding rows manually. An outline preserves a visible control for reopening the hidden detail, while manually hidden rows do not become part of a navigable hierarchy.
How nested grouping works
A child group covers a smaller set of rows; a parent group covers a larger range that includes the child group and any related summary rows. The parent can therefore hide several child groups together, while each child remains independently expandable when its parent is open. The row ranges need to reflect the structure you want to communicate.
For example, a sales report could have one row for the annual total, a row for each quarterly total, and several transaction rows beneath each quarter. Group each quarter’s transactions first. Then group the larger range containing the quarterly summaries and their detail rows. The annual total remains visible when that larger group is collapsed, provided the total is outside the grouped range.
Excel’s outline settings determine whether it expects summary rows above or below detail. The summary row should generally sit outside the detail rows it summarizes. If the summary is above the detail, keep it above the grouped range; if it is below, keep it below. A sensible layout makes the outline easier to read and avoids hiding a total along with the rows it is meant to summarize.
Create multiple levels step by step
- Arrange the worksheet so each summary row and its related detail rows are easy to identify. Keep the rows for each child group together, and decide whether summary rows sit above or below their details.
- Select the row numbers for the first set of detail rows by dragging over their headers. Selecting complete rows is a straightforward approach when you want to hide the entire row, rather than only cells in one column.
- Choose Data > Outline > Group. If Excel asks whether to group Rows or Columns, choose Rows. A bracket and a minus button should appear beside the selected rows.
- Repeat the selection and grouping for each other detail set at the same level. For example, group the transaction rows for each quarter separately.
- Select the larger range that represents the parent level, including the child groups and any intermediate summary rows that should be hidden when the parent collapses. Choose Data > Outline > Group again.
- Use the outline level buttons and the plus or minus controls to check the result. Expand the outline before making another selection if hidden rows make it difficult to see which row numbers belong in the parent range.
On Windows, Alt+Shift+Right Arrow groups the selected rows, and Alt+Shift+Left Arrow ungroups them. On Mac, the corresponding shortcuts are generally Option+Shift+Right Arrow and Option+Shift+Left Arrow; keyboard mappings can vary with the Excel version and macOS settings, so use Data > Group or Data > Ungroup if a shortcut does not work. In Excel for the web, use the Data tab’s grouping controls if they are available in your workbook; the desktop ribbon and keyboard shortcuts may differ.
Example: quarters, months, and transactions
Imagine a report with an annual total in row 1, a Q1 summary in row 2, January transactions in rows 3–5, a Q2 summary in row 6, and April transactions in rows 7–9. To make transaction details collapsible by quarter, group rows 3–5 and rows 7–9 separately. Those are the child groups. Keep each quarterly summary row outside its own transaction group so it can remain visible when that detail is collapsed.
For a parent level that hides the quarter summaries and their transactions while leaving the annual total visible, select rows 2–9 and group them. When this parent group is collapsed, row 1 remains as the top-level summary. When it is expanded, the quarter-level groups can still be collapsed independently. In a complete report, repeat the same pattern for the other quarters and ensure each parent range includes the appropriate summary and detail rows.
This example illustrates why grouping order matters. Create the smaller child groups first, then create the wider parent group. Afterward, test each outline level: the top level should show only the annual summary, the next should expose quarter summaries, and the most detailed level should show the transactions. If a level shows an unexpected row, revise the selected ranges or the placement of summary rows.
Expand, collapse, and control the outline
Click a minus button to collapse its group; click the resulting plus button to expand it. The numbered buttons at the upper-left of the outline select a display level: a lower level shows fewer details, while a higher level reveals more. The exact level shown depends on how many nested groups the worksheet contains and how Excel has arranged the outline.
Collapsing a parent can hide its child groups from view without removing them. Expand the parent first to reach the child controls. If a control is hard to locate, look along the left edge of the row headings for the bracket that marks the group. You can also use the numbered level buttons to reveal the desired amount of detail across the outline at once.
To remove a group, select its row range and choose Data > Outline > Ungroup. Excel may ask whether to ungroup rows or columns. Ungrouping removes that outline grouping; it does not delete the worksheet rows or their contents. If you want to remove the entire outline, use Data > Outline > Ungroup and choose Clear Outline where that command is available. Clearing an outline removes the grouping structure, so expand the rows first if you want to inspect or preserve the current display before changing it.
Set summary-row placement and build automatic outlines
When grouping behaves unexpectedly, check where summary rows sit. On Windows, open Data > Outline and use the dialog launcher to open Outline Settings. The settings include Summary rows below detail and Summary columns to right of detail. Choose the row option that matches the worksheet’s layout. This setting affects how Excel treats summary rows during outlining; it does not move rows or create totals.
For lists organized by a consistent field, Excel’s Subtotal command can insert subtotal rows and create an outline automatically. Sort the data by the field you want to subtotal, then use Data > Outline > Subtotal to choose the grouping field and calculation. For example, sorting sales records by Region before inserting subtotals can produce a subtotal for each region and an outline for showing or hiding the underlying records.
Subtotal is not the same as manually grouping rows. It inserts calculation rows as well as an outline, so check the selected range and options before applying it. The command is designed for ordinary ranges; it may be unavailable or unsuitable while the data is formatted as an Excel Table. If your data is in a table, consider whether a PivotTable or a separate summary layout better fits the task rather than changing the table solely to use Subtotal.
Common problems and fixes
- No outline symbols appear: Confirm that the rows were grouped and that the worksheet is set to display outline symbols. On Windows, check File > Options > Advanced > Display options for this worksheet > Show outline symbols if an outline is applied. Also check that the selected rows were not already grouped or that the symbols are not outside the visible part of the sheet.
- The wrong rows disappear: Expand all levels, inspect the row numbers, and group the exact range again. A selection that includes a summary row can hide the total you meant to keep visible. Check summary-row placement and the Outline Settings before rebuilding the groups.
- The parent group does not act as expected: A parent range must cover the intended child groups and any intervening summary rows. Create child groups first, then select the broader range. If the desired parent range is not contiguous, rethink the layout; one group cannot represent separated blocks as a single continuous row range.
- The outline has too many levels: Excel is limited to eight levels. Simplify the hierarchy by combining categories, removing a redundant layer, or using filters, a PivotTable, or separate report sheets for another way to navigate detail.
- Grouping is unavailable or confusing: Check whether the sheet is protected, whether the selection contains rows in a filtered or structured table, and whether the workbook is open in an environment with different ribbon controls. If needed, try the desktop version and inspect the Data tab’s Outline group.
When grouping is the right choice
Use grouping when the worksheet has a stable, visible hierarchy and readers need to move between summaries and the rows behind them. It works particularly well for reports laid out in sections, where related rows are contiguous and summary rows have a clear position. It is less helpful for a large flat data list that readers need to slice by different criteria, because an outline follows fixed row ranges rather than changing dynamically to match a selection.
For a flat list, filters can show records meeting criteria without defining nested row groups. A PivotTable is often a better fit when users need to rearrange categories, summarize values, or explore the same data in different ways. Manual hiding is suitable for a temporary display change, but it lacks the outline’s level controls. These choices are not mutually exclusive: a report can use an outline for its fixed sections and filters or PivotTables for analysis.
Frequently Asked Questions
Can Excel group rows in more than two levels?
Yes. Excel supports up to eight outline levels. Create smaller groups for the lower-level detail, then create larger parent groups around them. Keep the hierarchy understandable rather than using every available level.
Can I group nonadjacent rows together?
Not as one ordinary row group. A group represents a continuous range of rows. Create separate groups for separate blocks, or reorganize the data if those blocks belong in one collapsible section.
Does grouping add subtotals automatically?
No. Manual grouping only creates collapsible row ranges. Use formulas or Excel’s Subtotal command when you need calculations; verify the summary values separately from the outline structure.
How do I show all grouped rows again?
Click the highest outline level button to display the most detail, or expand individual groups with their plus buttons. If the outline has been removed, use Undo immediately if available or recreate the groups.
Can I group columns as well as rows?
Yes. Select the column headers and use Data > Outline > Group, choosing Columns if Excel prompts you. The outline controls then appear above the column headings rather than beside the row numbers.
Related
- Excel Circular Reference When There Are None?
- Excel Change Page Breaks: Adjust Print Layout
- Excel PivotCharts: How to Create and Use Them
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Create Rules in Outlook for Gmail: A Step-by-Step GuideTo create a rule for Gmail in classic Outlook for Windows, open File > Manage Rules & Alerts…
- Track Changes in Word: A Step-by-Step GuideTo track edits in Word, open the document, select Review > Track Changes, and then edit as usual.…
- Excel Cell Adjustment Shortcut: Resize Rows and ColumnsIn Excel for Microsoft 365 on Windows, use Alt, H, O, I to AutoFit a column to its…
- Temporary Filter in Google Sheets: How to Use OneTo apply a temporary filter in Google Sheets without changing what collaborators see, open the sheet in a…
- Calculate Age in Excel From a Birth Date, Step by StepTo calculate someone’s age in completed years in Excel, put their birth date in A2 and enter =DATEDIF(A2,TODAY(),"Y")…
- How to Insert a Drop-Down Menu in Excel and Edit ItTo insert a drop-down menu in Excel for Microsoft 365 on Windows, select the cell, choose Data >…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.