Yes. In Excel for Microsoft 365 on Windows, select the rows you want to fold away, then choose Data > Group in the Outline area; use the minus button beside the row numbers to collapse them and the plus button to expand them. You can also select the rows and press Alt+Shift+Right Arrow. Grouping hides and reveals rows without deleting their contents.
Group rows with the ribbon
For a simple outline, keep a heading or summary row outside the group so it remains visible when the detail is collapsed. For example, if rows 3–8 list six monthly transactions and row 9 contains a total, select rows 3–8 by dragging across their row-number labels, then choose Data > Group. Excel creates an outline control along the left edge of the worksheet. Click the minus sign to hide those six rows; click the plus sign that replaces it to show them again.
- Arrange the worksheet so the rows to fold are together and the label or summary you want to keep visible is outside the selection.
- Select the row numbers for the detail rows. To select a continuous block, click the first row number and drag to the last, or click the first and Shift-click the last.
- Open the Data tab and choose Group in the Outline group. If Excel asks whether to group rows or columns, choose Rows.
- Use the minus control to collapse the group and the plus control to expand it. To reverse the setup, select the grouped rows and choose Data > Ungroup.
If the row controls do not appear where expected, check whether the worksheet has outline symbols hidden. On Windows, open File > Options > Advanced, find the display options for the worksheet, and enable Show outline symbols if an outline is applied. The symbols may also be outside the visible area if the sheet is scrolled horizontally or the row-number margin is obscured.
What grouping does—and what it does not do
Grouping is an outline feature for temporarily hiding worksheet rows or columns. It does not remove data, change formulas, sort records, or calculate a subtotal. A collapsed group is still part of the worksheet: formulas can continue to include its hidden values, and users can reveal the rows again with the plus control. This makes grouping useful when a reader needs a compact overview but may occasionally need to inspect supporting detail.
For instance, a project plan could show one visible phase row followed by tasks underneath. Grouping the task rows lets someone collapse completed or lower-level work while leaving the phase labels visible. A budget worksheet could similarly show a department total with its individual expense lines hidden underneath. The total must be calculated separately—for example, with a SUM formula—because the outline itself does not create totals.
When rows are hidden by an outline, Excel provides controls for expanding and collapsing the group and for displaying outline levels. This is different from manually hiding rows with Home > Format > Hide & Unhide > Hide Rows. Manually hidden rows do not become an outline group with plus and minus buttons. Conversely, grouping is not a security feature: anyone with access to the workbook can expand the rows and see their contents.
Arrange summary rows and detail
A useful layout puts each summary row next to the detail it describes, but outside the group. If the detail is above its summary, grouping only the detail rows leaves the summary visible below it. Excel’s default outline setting treats summary rows as below detail. If your worksheet places summaries above their details, adjust the outline setting so the controls match the layout: on Windows, open the dialog launcher in the Data tab’s Outline group and clear Summary rows below detail.
Consider a worksheet with a heading in row 2, detail in rows 3–7, and a subtotal in row 8. Select rows 3–7, not the heading or subtotal. Collapsing then leaves the heading and subtotal available as context. If you select the subtotal row as part of the group, it will disappear along with the detail, defeating the purpose of a compact summary. The same principle applies to columns: keep the label or result column outside the grouped block if it should stay visible.
Before grouping, check for blank rows, repeated headings, and totals that interrupt the detail. Groups work best when each block is a clear, contiguous set of rows. You can group multiple nonadjacent blocks separately, but selecting one large range that contains intervening summaries will hide those summaries too. For a report that will be read by other people, use descriptive labels and a short note explaining what each visible subtotal represents.
Create nested groups for multiple levels
Excel supports nested outlines, so a large group can contain smaller groups. For example, a yearly report might have detail rows grouped by month, then those monthly blocks grouped again by quarter. First group each month’s detail rows. Next select the rows covering the months in a quarter, including the monthly summary rows if those should disappear when the quarter is collapsed, and group that larger range. A reader can then expand a quarter to see its months, or expand a month to inspect its transactions.
The numbered outline level buttons at the top of the row controls show progressively more detail. Clicking a lower level hides more nested groups; clicking a higher level reveals more. The exact number of levels depends on how many layers you create. Plan the hierarchy before grouping: a clean progression from overall summary to category to individual records is easier to navigate than several groups with unclear boundaries.
Nested grouping does not combine the values in those rows. If quarter totals or monthly totals are required, place formulas in separate summary rows and decide deliberately whether each summary row belongs inside its parent group. Test the outline at each level after building it. A common layout error is grouping a parent range in a way that hides the very subtotal needed to explain the parent’s total.
Use automatic outlines or subtotals when appropriate
For a worksheet with a consistent hierarchy and recognizable summary formulas, Excel may be able to create an outline automatically. On Windows, look for Data > Group > Auto Outline in the Outline controls. Auto Outline examines the worksheet’s structure and formulas to infer detail and summary relationships. It is a convenience, not a guarantee: irregular layouts, unrelated formulas, or missing summary rows can lead to an outline that needs correction. Review the result before relying on it, and use ordinary manual grouping when you need precise control.
If your real goal is to calculate and display totals for categories in a flat list, consider the Subtotal command instead of making groups by hand. Sort the records by the category first, then use Data > Subtotal to insert subtotal rows and an outline. For example, sorting a sales list by region before applying subtotals can produce a total for each region and controls to collapse the underlying sales lines. Subtotal is aimed at a regular range of data; it is unavailable for an Excel table, so convert a table to a range if that workflow is appropriate. Do not confuse this with grouping alone, which only manages visibility.
Fix common grouping problems
- Group is unavailable: Check whether the worksheet is protected, whether you are editing a cell, and whether the selection is valid. Exit cell-edit mode with Enter or Esc, select full row headings, and try again. Protection settings can restrict outline changes.
- The plus and minus buttons are missing: Confirm that an outline was created and that outline symbols are enabled in Excel’s display options. Also check that you have selected rows rather than merely typed a range reference into a cell.
- The wrong rows disappear: Expand the outline, inspect the selected row numbers, and ungroup the incorrect range before creating the group again. Check especially for totals or headings included accidentally.
- Some detail remains visible: The selection may not cover every row in the block, or the remaining rows may belong to a separate group. Expand all levels and inspect the outline boundaries before regrouping.
- Filtering seems to change what is visible: Filters and outlines are separate tools. A filter hides records that do not meet a condition; an outline collapses a chosen range. When both are in use, the visible result can reflect both mechanisms.
To remove one level of grouping, select the rows in that group and choose Data > Ungroup. To remove every outline level from a sheet, use the dropdown next to Ungroup and choose Clear Outline. Clearing an outline does not erase the worksheet data, but it removes the group controls. If you only need to reveal rows temporarily, expand the group instead of clearing it.
Windows, Mac, and Excel for the web
The ribbon method is the clearest option on Windows: select row headings and choose Data > Group. The Windows shortcut for grouping is Alt+Shift+Right Arrow; for ungrouping, use Alt+Shift+Left Arrow. On Mac, use Shift+Option+Right Arrow to group and Shift+Option+Left Arrow to ungroup. Keyboard behavior can depend on the keyboard layout and macOS settings, so use the Data tab if a shortcut is intercepted or differs on your setup.
Excel for Mac also provides grouping through the Data tab, although the ribbon layout and dialog presentation can differ from Windows. Excel for the web may offer a more limited set of outline controls depending on the current interface and workbook; if you cannot create or manage the required outline there, open the workbook in the desktop app. A workbook with outline groups can still be useful for readers who only need to expand or collapse existing detail, but check its behavior in the version your audience uses.
Frequently Asked Questions
Can I make rows collapsible without hiding them manually?
Yes. Use Data > Group to create an outline. The minus and plus controls collapse and expand the selected rows while keeping their contents in the worksheet.
How do I collapse all grouped rows at once?
Click the appropriate numbered outline level button above the row numbers. A lower level shows a more compact view; clicking a higher level reveals more detail. The available levels depend on how the groups are nested.
Can I group columns as well as rows?
Yes. Select the column letters you want to fold, then choose Data > Group and choose Columns if Excel asks. Column groups use outline controls above the column headings.
Does collapsing a group change formulas or totals?
No. Collapsing changes what is displayed, not the underlying values or formulas. A subtotal must be calculated separately, and a formula may still include values in rows that are currently hidden.
How do I remove the outline but keep the data?
Select the grouped rows and choose Data > Ungroup to remove a group, or choose Clear Outline from the Ungroup dropdown to remove all outline groups on the sheet. The row contents remain in place.
Related
- Excel: Hide Row and Column Numbers from the Worksheet View
- Excel Hide Specific Columns: Steps and Tips
- Excel: Hide Row Numbers and Column Letters in Sheets
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Create and Print Number Labels in Microsoft WordTo create sequential number labels in Microsoft Word, put one number per row in an Excel list, then…
- Creating a Signature in Microsoft Outlook: Setup GuideTo create an Outlook signature, open the signature settings for your version of Outlook, add and format the…
- Excel Date Settings: Formats, Systems, and Common FixesExcel date settings control how dates are displayed, interpreted, and calculated. In Microsoft Excel for Microsoft 365 on…
- How to Loop a PowerPoint Slideshow Without ClickingTo loop a PowerPoint slideshow without clicking, set the slides to advance automatically and turn on continuous looping.…
- How to Delete a Continuous Page Break in WordTo delete a continuous page break in Word, show formatting marks, find the line labeled Section Break (Continuous),…
- Hide Excel Columns Based on Cell Values AutomaticallyTo hide Excel columns when a cell contains a chosen value, use a short VBA macro that checks…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.