Yes. In Excel for Microsoft 365 on Windows, select the row headers you want to group, then choose Data > Outline > Group; if Excel asks, select Rows. Use the minus and plus outline buttons beside the row numbers to collapse or expand the group.
What grouping rows does in Excel
Grouping creates an outline: a set of rows that you can temporarily hide and show together. For example, you might group the January-through-March detail rows beneath a quarterly total. Clicking the minus button hides those detail rows while leaving the total visible; clicking the plus button restores them.
Grouping does not delete data, move it, or change the values in cells. It also does not combine rows into one record. The rows remain in the worksheet, and formulas that refer to them continue to work. This makes grouping useful when a sheet needs both a detailed view and a compact overview.
Excel displays outline controls beside the row numbers. A minus sign indicates an expanded group; a plus sign indicates a collapsed one. Numbered outline-level buttons above the row numbers let you show a broader or more detailed view of the outline. These controls are separate from worksheet filters and from the hide-and-unhide commands.
How to group rows step by step
- Arrange the worksheet so each group of detail rows is adjacent. If you want a subtotal or heading to remain visible when the detail is collapsed, keep that summary row outside the rows you select.
- Select the row headers for the detail rows. For example, click row 5, then hold Shift and click row 9 to select rows 5 through 9. You can also drag down the row headers. Selecting row headers makes it clear that you intend to group entire rows, rather than just cells in one column.
- On the ribbon, choose Data > Outline > Group. If a dialog asks whether to group rows or columns, choose Rows. Excel adds an outline bracket and a minus button beside the selected rows.
- Click the minus button to collapse the group. Click the plus button to expand it again. The outline-level buttons can also display several groups at once at a chosen level.
For a quick Windows method, select the rows and press Alt+Shift+Right Arrow to group them. Press Alt+Shift+Left Arrow to ungroup the selected rows. On a Mac, use the Data tab’s Group and Ungroup controls if the Windows shortcuts do not apply; keyboard shortcuts can differ by keyboard layout and Excel version.
How outlines and summary rows work
An outline marks which rows belong together and gives Excel a way to hide or reveal that range. A common layout puts the summary row immediately after its detail rows: for instance, rows 5–9 contain transactions and row 10 contains their total. Group rows 5–9, not row 10, so the total stays on screen when the group is collapsed.
Excel normally places outline symbols to the left of row numbers and the level buttons above them. If the controls are missing, the outline may still exist; check the display setting described in the troubleshooting section. The worksheet setting called Summary rows below detail affects where Excel expects summary rows when creating outlines automatically. For a manually created group, selecting only the intended detail rows is the most direct way to control what remains visible.
A collapsed group is not a filter. A filter hides records that do not meet a condition, such as showing only one department. An outline hides a chosen block of rows regardless of their cell values. You can use both in a worksheet, but they solve different problems.
Make nested groups for multiple levels
You can group smaller ranges inside a larger range to make a multilevel outline. Imagine a yearly report with monthly rows and quarterly totals. Group the three months under each quarter first, keeping each quarter’s total outside its monthly group. Then select the quarterly detail ranges and group them under the annual total. The finer groups can be opened or closed individually, while the larger group can hide a broader section.
Excel supports up to eight outline levels. In ordinary reports, two or three levels are usually easier to understand than a deeply nested outline. Make sure each summary row is outside the detail group it summarizes; otherwise, collapsing a group can hide the figure readers need to see.
- Level 1: a compact overview with the highest-level summaries visible.
- Level 2: an intermediate view, such as quarterly totals.
- More detailed levels: lower-level groups opened to show monthly or transaction-level rows.
Practical examples of row grouping
Grouping is most useful when a worksheet has a natural hierarchy and readers sometimes need detail but do not need to see it all at once. In a budget worksheet, for instance, you could keep a category total visible and group the individual purchases beneath it. In a project plan, you could leave a phase heading visible and group the task rows belonging to that phase. In a sales report, monthly records could be grouped beneath a quarterly summary.
Use clear labels and consistent structure. If one section’s total is above its details while another section’s total is below, users may find the outline harder to interpret. Before sharing the file, consider whether it should open with detail expanded or collapsed. The saved view can affect what a recipient sees when opening the workbook, although the recipient can use the outline controls to change it.
Ungroup rows or remove an outline
To remove one grouping level, select the grouped rows or a cell within the group and choose Data > Outline > Ungroup. If Excel asks whether to ungroup rows or columns, choose Rows. On Windows, Alt+Shift+Left Arrow is the ungroup shortcut. Removing a group changes the outline structure, not the cell contents.
To remove all outline groupings from the sheet, choose Data > Outline > Ungroup and use Clear Outline from the Ungroup menu. This removes the outline levels at once. It does not delete the worksheet data, but it does remove the controls that let you collapse those groups. If rows were hidden separately with the Hide command, clearing an outline may not unhide them; use the row headers and Home > Format > Hide & Unhide > Unhide Rows to reveal manually hidden rows.
Automatic outlines and the Subtotal command
If the data already contains a clear hierarchy or summary formulas, Excel may be able to create an outline automatically. On Windows, try Data > Outline > Group > Auto Outline. Excel examines the worksheet structure and creates groups based on the relationships it recognizes. The result depends on how the data and formulas are arranged, so review the outline rather than assuming it grouped the intended rows.
For a sorted list that needs subtotals whenever a field changes, the Subtotal command can insert summary rows and create an outline. First sort the records by the field you want to subtotal, then use Data > Outline > Subtotal and choose the grouping field and calculation. For example, sorting sales records by region before inserting subtotals can create a total for each region. Subtotal is designed for a regular range of data and may be unavailable for a formatted Excel Table; if necessary, convert the table to a range first. Automatic tools can insert or reorganize rows, so save a copy before using them on an important report.
Common problems and fixes
- No plus or minus buttons appear: Open Excel’s outline display setting. On Windows, choose File > Options > Advanced, find the display options for this worksheet, and enable Show outline symbols if an outline is applied. Also check whether the rows are hidden for another reason.
- The summary disappears with the detail: The summary row was likely included in the selected group. Ungroup and recreate the group using only the detail rows, leaving the total or heading outside the selection.
- Excel groups columns instead of rows: Select the row headers before choosing Group, or choose Rows if the dialog appears. Selecting cells across a range can make Excel’s intended direction less obvious.
- The group contains the wrong records: Check for blank rows, misplaced totals, or an unexpected selection. Ungroup the range and select the exact contiguous row headers again. Sorting records after creating an outline can also make the visual grouping inappropriate, so review the outline after reorganizing data.
- Grouping is unavailable or behaves unexpectedly: The worksheet may be protected, the selection may include an unsuitable range, or the workbook may be in a mode that restricts editing. Check the sheet’s protection status and try the command in a normal worksheet range.
Grouping compared with hiding and filtering
Choose grouping when you want a reusable, visible hierarchy with one-click expand and collapse controls. Choose a filter when users need to show records based on values, such as a date range, customer, or status. Choose Hide Rows when you only need to conceal a few rows temporarily and do not need an outline or level controls.
Hidden rows can be less obvious to other people because there may be no plus button or outline bracket to signal that data is concealed. Grouping makes the existence of hidden detail more apparent. Filters, in contrast, are better for interactive exploration of a list. Neither grouping nor hiding is a security measure: someone with access to the workbook may be able to reveal the hidden rows. Do not use either feature to protect confidential information.
Frequently Asked Questions
Can I group rows using a keyboard shortcut?
Yes. In Excel for Microsoft 365 on Windows, select the rows and press Alt+Shift+Right Arrow to group them. Use Alt+Shift+Left Arrow to ungroup. On Mac, use the ribbon commands if the Windows shortcuts are not available.
How do I collapse all grouped rows at once?
Click the outline-level button for the overview level, commonly level 1, above the row numbers. This shows the highest-level summaries and collapses lower-level details. The exact display depends on how many levels the worksheet contains.
Can I group rows that are not next to each other?
Excel outlines are intended for contiguous blocks of rows. Put related rows together, or use a filter or separate groups to manage nonadjacent records; grouping one scattered selection is not a reliable substitute for a hierarchy.
Does grouping change formulas or delete hidden data?
No. Grouping only collapses the display of rows. The values remain in the worksheet, and formulas continue to refer to the cells unless you separately edit or delete them.
Why does Excel show a plus sign but not the hidden rows?
A plus sign means the outline group is collapsed. Click it to expand the rows. If nothing changes, check for other hidden rows, worksheet protection, or a different group level that is also collapsed.
Related
- Add a Jigsaw Sudoku Solver to Excel
- Add Quadrants to an Excel Scatter Plot: Step-by-Step
- How Excel Files Become Corrupted: Causes and Risks
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- IF vs IFS in Google Sheets: Which Formula Should You Use?In Google Sheets, use IF to test one condition and return one result when it is true and…
- Multiple Dependent Dropdowns in Google Sheets: SetupYes. In Google Sheets, you can create multiple dependent dropdowns by using a parent selection to filter a…
- Protected Sheets in Google Sheets: Setup and PermissionsA protected sheet in Google Sheets limits which editors can change a whole sheet or selected cells. In…
- How to Create Calendar Rules in Outlook for EventsOutlook does not have a general calendar rule engine that automatically changes calendar events when they meet conditions.…
- Dynamic Dependent Dropdown List in Excel: How to Build OneTo create a dynamic dependent dropdown in Microsoft 365 Excel, store category and item pairs in an Excel…
- Group Cells in Excel Without Merging: A Step-by-Step GuideTo make a heading span several Excel cells without combining them, select the cells, open Format Cells with…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.