To group rows in Excel and hide them, select the detail rows, choose Data > Outline > Group, then click the minus sign beside the row numbers to collapse the group. The rows are hidden from view but remain in the worksheet, and you can reveal them again with the plus sign.
What You’ll Need
- A worksheet in Excel for Microsoft 365 on Windows, with the rows you want to collapse arranged together.
- Permission to edit the worksheet. If it is protected, you may need the password or help from its owner.
- A visible row-number area on the left side of the sheet, where Excel displays the outline controls.
Step-by-Step
- Identify the rows to group.
Choose one continuous block of detail rows. For example, if row 4 contains column headings and rows 5 through 9 list individual transactions, the detail block is rows 5–9. Keep the heading outside the selection if it should stay visible when the details are collapsed. Grouping is most useful when the rows belong together and a summary row or label remains outside the block.
- Select the complete rows.
Click the row number for the first detail row, then drag down the row-number area to the last one. In the example, click row 5 and drag through row 9. You can also click row 5, hold Shift, and click row 9. The entire row should be highlighted. Avoid selecting only a few cells if you mean to group whole rows; selecting row headers makes your intention clear and helps Excel apply the correct outline.
- Open the Group command.
On the ribbon, choose Data > Outline > Group. If you selected full row headers, Excel generally groups the rows directly. If Excel shows a Group dialog, select Rows and confirm. The outline controls appear next to the row numbers, usually as a bracket alongside the grouped rows and a minus button.
- Collapse the group to hide its rows.
Click the minus button at the end of the bracket. Excel collapses the selected block, hides its detail rows, and replaces the minus with a plus button. The remaining visible rows move together on screen, but the underlying data is still in the worksheet. In the example, rows 5–9 are concealed while row 4 and the rows following the group remain available.
- Expand the rows when you need them.
Click the plus button beside the collapsed group. Excel shows the detail rows again without removing the grouping. You can switch between the expanded and collapsed views whenever you need to inspect details or return to a shorter worksheet view. The plus and minus controls affect the display, not the cell contents.
- Use outline levels for a larger sheet.
When you have groups, small numbered level buttons appear above the row numbers, often labelled 1 and 2. Click level 1 to show the most summarized view, or level 2 to show the grouped detail. The number of levels depends on how many layers of groups exist. If you group rows 5–9 and then create a broader group that includes them, the groups are nested; use the level buttons to move between the broader and more detailed views.
- Create additional groups for other sections.
Repeat the selection and Group steps for each separate block of rows you want to collapse. For example, a monthly report might have one group for January’s transactions and another for February’s. Group each contiguous block separately so that each has its own outline control. To make nested groups, first group smaller detail blocks, then select the larger range that contains them and group that range too.
- Save and check the collapsed view.
Save the workbook after arranging the outline. Check that the intended summary labels remain visible and that the plus button can restore each detail block. If someone else will use the file, leave at least one relevant group collapsed so the outline is easy to spot, and tell them that the plus and minus buttons reveal or conceal detail.
Keyboard option: In Excel for Windows, select the rows and press Alt+Shift+Right Arrow to group them. Press Alt+Shift+Left Arrow to ungroup the selected rows. The ribbon route is easier to follow if you are unsure which rows are selected or if a dialog appears.
Common Mistakes
- Including the summary or heading row. If you want a total, label, or column header to remain visible, do not include it in the detail-row selection. For instance, group the transaction rows below a monthly total rather than grouping the total row with them.
- Choosing Hide Rows instead of Group. Hiding rows through Home > Format > Hide & Unhide > Hide Rows conceals them, but does not create the outline bracket and plus/minus controls. Use Group when you want a collapsible section that is easy to expand again.
- Selecting only cells in a way that groups columns. If you select cells rather than row headers, Excel may ask whether to group rows or columns. Choose Rows for a vertical list of records. If the result is a column outline instead, undo or ungroup it and repeat with the correct row selection.
- Trying to make one group from separated blocks. A group is intended for a continuous range. If rows 5–9 and 14–18 are separate sections, group each block on its own. Grouping a broad range that includes unrelated rows can hide material you meant to keep visible.
- Assuming hidden means deleted. Collapsed rows remain part of the worksheet and can still affect formulas, charts, and other workbook features. Grouping is a display aid, not a way to remove records or secure sensitive information.
Tips
- Make the visible structure obvious. Keep section labels or totals outside the detail group and use consistent labels such as “January total” or “Department summary.” This helps readers understand what the collapsed section contains without opening it.
- Start with a small test group. If the worksheet has many rows or an unfamiliar layout, group one short block and collapse it before applying the same approach across the sheet. Confirm that the right rows disappear and the intended headings stay in place.
- Use nested groups sparingly. Layers are useful when readers need both a high-level summary and finer detail, but too many levels can make the outline hard to navigate. Use level buttons to check that each view communicates a clear amount of detail.
- Keep outline controls visible. Excel normally shows the controls beside row numbers when an outline exists. If they are missing, open File > Options > Advanced, find Display options for this worksheet, and enable Show outline symbols if an outline is applied.
- Choose the right tool for a one-time concealment. Grouping is ideal for sections users will open and close repeatedly. For a temporary hide with no need for outline controls, use Hide Rows instead. Neither approach protects confidential information.
Troubleshooting
- The Group command is unavailable. Check whether the worksheet is protected or whether you are editing a cell. Press Enter or Esc to finish editing, then try selecting the row headers again. If the sheet is protected, ask the workbook owner to unprotect it or permit the necessary changes before grouping.
- The rows group, but the plus and minus signs do not appear. First check the outline-symbol setting described above and make sure the row headings are visible. Then look for the outline bracket at the left edge of the grouped range. If you are viewing the workbook in a narrow window, widen the Excel window or inspect the area immediately beside the row numbers.
- The wrong rows disappear. Click the plus sign to expand the group, then inspect the bracket to see which rows it covers. If the range is wrong, select the affected rows and choose Data > Outline > Ungroup; choose Rows if prompted. Select the correct range and group again. If you only need to remove all outlines from the sheet, use Data > Ungroup > Clear Outline, then rebuild the groups you need.
- Rows remain hidden after you remove a group. They may have been hidden separately using Hide Rows. Select the row numbers above and below the hidden area, then choose Home > Format > Hide & Unhide > Unhide Rows. You may need to select the surrounding rows because the hidden row numbers cannot be clicked directly.
- The controls look different on Mac or in Excel for the web. On Mac, select the row headers and use the Data tab’s Group command; menu labels or ribbon placement can vary by release. In Excel for the web, available outline commands and controls may differ from desktop Excel. If you cannot create or manage the outline there, open the workbook in Excel for Microsoft 365 on Windows or Mac and use the Data tab.
Frequently Asked Questions
Does grouping rows delete or change their data?
No. Grouping collapses rows from view but keeps their contents in the worksheet. Click the plus sign to show them again. It is not a security feature and should not be used to conceal private information.
Can I group rows without hiding them right away?
Yes. Grouping adds the outline controls, but the rows can remain expanded. Click the minus button only when you want to collapse them. This lets you prepare an outline first and choose the view later.
How do I hide several different sections?
Create a separate group for each continuous block of detail rows. For example, select and group one department’s records, then repeat for the next department. Each section can be expanded or collapsed independently.
How do I remove the grouping but keep the rows visible?
Expand the group if needed, select its rows, and choose Data > Outline > Ungroup. If Excel asks, choose Rows. Ungrouping removes the outline controls; it does not delete the rows or their values.
Can I group columns as well as rows?
Yes. Select the column letters you want to group and use Data > Outline > Group, choosing Columns if Excel asks. The same outline idea applies, but the controls appear above the column letters rather than beside the row numbers.
Why can I still see some rows when I click outline level 1?
Level 1 shows the highest summary level available; it does not mean every row disappears. Rows outside a group, such as headings or summary lines, remain visible by design. Review the group brackets and adjust the selected ranges if the displayed summary is not the one you want.
Related
- Excel New Sheet: How to Add and Open One
- Excel New Row Shortcut: Insert Rows Above or Below
- Excel New Blank Workbook: Create, Save, and Set It Up
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Day and Date Formats: Codes, Examples, and FixesIn Excel for Microsoft 365 on Windows, a date’s day and date format controls how its value appears,…
- Excel Inventory List: How to Build and Manage StockTo create an Excel inventory list, make columns for each item’s SKU, description, location, quantity, reorder point, and…
- Excel Date Format Shortcut: Change Dates in SecondsTo change selected cells to Excel’s standard date display in Microsoft Excel for Microsoft 365 on Windows, select…
- How to Delete Blank Rows at the End of an Excel SheetTo delete blank rows beneath your data in Excel for Microsoft 365 on Windows, find the last row…
- How to Unhide Rows in Excel With a Keyboard ShortcutTo unhide rows in Excel for Microsoft 365 on Windows, select the row headers immediately above and below…
- How to Add a Drop-Down List in Excel for Easy EntryTo add a drop-down list in Excel for Microsoft 365 on Windows, select the cell or cells, choose…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.