How to Quickly Group Rows in Excel with the Outline Tools

How-to basics · Updated November 21, 2026

To quickly group rows in Excel, select the detail rows you want to fold away, then choose Data > Outline > Group and select Rows if Excel asks. Use the minus button beside the row numbers to collapse the group and the plus button to show it again. Grouping hides and reveals rows without deleting or changing their contents.

This is useful when a worksheet has detail records beneath totals, monthly data beneath yearly summaries, or sections you only need to inspect occasionally. The instructions below are for Excel for Microsoft 365 on Windows. You will need an editable workbook and a consecutive set of rows to organize; the same basic ribbon approach is available in Excel for Mac and Excel for the web, although the layout can differ.

What You’ll Need

  • An Excel workbook with the rows you want to organize. Save a copy first if the sheet is important or shared.
  • A clear idea of which rows are detail and which, if any, are headings or summary rows that should remain visible.
  • Permission to edit the worksheet. If the sheet is protected, you may need the owner to allow outlining or remove protection before grouping.

Step-by-Step

  1. Identify the rows to fold. Look for one continuous block of detail rows, such as the transactions for January or the line items belonging to one department. Decide whether a heading or subtotal should remain visible when the details are collapsed. In a typical layout, select only the detail rows and leave the heading or subtotal outside the selection. For example, if row 8 contains a category total and rows 9 through 15 contain its detail, group rows 9 through 15. This makes the total easier to see when the group is closed.
  2. Select the rows. Click the row number of the first detail row, then drag down the row-number margin to the last one. To select a larger range precisely, click the first row number, hold Shift, and click the last row number. You can also select cells spanning the same rows; Excel can group the rows from that selection, but selecting row numbers makes your intention clearer. For nonadjacent rows, make separate groups for each continuous block rather than trying to group scattered rows together.
  3. Open the Group command. On the ribbon, click Data. In the Outline group, click Group. If Excel displays a dialog asking whether to group rows or columns, choose Rows and click OK. When complete rows are selected, Excel usually identifies the selection as rows automatically. If the Outline group is collapsed because the Excel window is narrow, widen the window or look for the Group command in the compressed ribbon controls.
  4. Check the outline controls. Look to the left of the row numbers for a bracket and a small minus (−) button beside the grouped section. Click the minus button to hide the detail rows. Excel replaces it with a plus (+) button; click that to expand the group. The rows still exist in the worksheet, and formulas that refer to them continue to work. If you do not see the controls, check the troubleshooting section below.
  5. Use outline levels for a quick overview. When a sheet has groups, numbered outline buttons such as 1 and 2 appear above the row numbers. Clicking a level button displays that level of detail across the worksheet. For a simple one-level outline, level 1 generally shows the summary view, while level 2 shows the detail. Click the plus or minus for one group when you want to change only that section. The numbered buttons are especially handy when a sheet has many groups and you want to collapse or expand them together.
  6. Add nested groups only when needed. To make a more detailed outline, first group smaller blocks, such as the daily rows within each month. Then select the larger range containing several of those blocks and group it as well, leaving appropriate summary rows outside the detail selection. Excel can show multiple outline levels, so users can collapse daily detail to monthly totals and then collapse months to a yearly view. Create one small test group before building a complicated outline; the nesting order and placement of summary rows affect which rows remain visible.
  7. Use the keyboard shortcut for speed. In Excel for Microsoft 365 on Windows, select the rows and press Alt+Shift+Right Arrow to group them. Press Alt+Shift+Left Arrow to ungroup a selected group. If Excel opens a Group dialog, choose Rows. On Mac, shortcut behavior can vary with the Excel version and keyboard settings, so use Data > Group if the Windows shortcut does not apply. In Excel for the web, use the Data ribbon command; keyboard shortcuts may be intercepted by the browser.
  8. Save and test the view. Collapse the new group and verify that the intended summary rows remain visible and that the correct details disappear. Expand it again to confirm the data is still there. Save the workbook after checking the result, particularly if others rely on the current worksheet layout.

Common Mistakes

  • Selecting a heading or total by accident. If a summary row is included among the detail rows, it may disappear when the group is collapsed. Select only the rows meant to be hidden, then adjust the selection and regroup if necessary.
  • Grouping a whole worksheet section unintentionally. Clicking a row number and dragging too far can include blank rows, totals, or unrelated sections. Check the highlighted row numbers before choosing Group.
  • Expecting grouping to sort or summarize data. Grouping only creates an outline that hides and reveals rows. It does not calculate totals, arrange records, or combine values. Add formulas or use a PivotTable if you need calculations or a different analysis.
  • Assuming collapsed rows have been deleted. A collapsed group is hidden, not removed. Avoid deleting rows just because you cannot see them; expand the outline first if you need to inspect the data.
  • Grouping scattered rows as one block. A group is a continuous range. Separate blocks need separate groups, and attempting to select nonadjacent rows may not produce the outline you expect.
  • Mixing up row and column grouping. If you selected columns, Excel may group columns instead. Look at what is highlighted before grouping and choose Rows if the dialog asks.

Tips

  • Keep summaries outside the detail group. Put a subtotal or category heading immediately before or after its detail rows, and select only the details. This keeps key context available in the collapsed view.
  • Use consistent group boundaries. If each month has the same kind of detail, group each month’s rows separately. Consistent boundaries make the outline easier to read and reduce accidental hiding of neighboring data.
  • Build complex outlines from small to large. Create the smallest groups first, then add an outer group if you need another level. Test the plus and minus controls at each stage instead of building a deep outline all at once.
  • Remember the row-number margin. Clicking and dragging row numbers is often faster and less error-prone than selecting cells, especially when the worksheet contains gaps or formatting that makes the data range look larger than it is.
  • Do not confuse Hide with Group. The Home ribbon’s Format options can hide rows, but hiding rows does not add outline controls or levels. Choose Group when you want a reusable, expandable outline.
  • Plan for printing and sharing. A saved workbook can retain its current collapsed or expanded view. Expand the necessary rows before printing if readers need to see the details, and tell collaborators how to use the outline controls if they are unfamiliar with them.

Troubleshooting

The Group command is unavailable. Confirm that you selected rows or cells in the worksheet, rather than a chart or another object. A protected sheet can also block outlining; ask the workbook owner to review protection settings. If the workbook is in a shared or restricted editing state, make an editable copy or request the needed permission.

The group was created, but no plus or minus buttons appear. In Windows Excel, open File > Options > Advanced, scroll to Display options for this worksheet, and check Show outline symbols if an outline is applied. Confirm that the correct worksheet is selected in the options list. Also look at the far left of the grid: the outline bracket and controls sit outside the worksheet cells, next to the row numbers.

Clicking minus hides the wrong rows. Expand the group, inspect the bracket to see its exact boundaries, and ungroup it. Select the correct detail rows and group again. Use Data > Ungroup to remove the selected outline level. If the structure has become confusing, Data > Ungroup may offer an option to clear the outline; use it carefully because it removes outline groups, not the underlying data.

Rows seem to remain hidden after expanding. The rows may be hidden manually or by a filter, rather than by the outline. Check for filter buttons in the header and clear any active filter. You can also select the affected row numbers, right-click, and choose Unhide if rows were hidden manually. Expand the outline first so you can distinguish the two causes.

The outline levels do not show the view you expect. Check whether summary rows are positioned above or below their detail and whether an outer group includes smaller groups. Excel’s outline settings control where summary rows are placed; find them under Data > Outline using the small dialog launcher, then review Summary rows below detail. Changing this setting affects how Excel interprets the outline, so inspect the sheet before changing it. For a simple outline, regrouping a clean, correctly selected range is often easier than trying to repair several overlapping groups.

Frequently Asked Questions

Can I group rows without hiding them permanently?
Yes. Grouping is reversible. Click the plus button to show the rows again, or use Data > Ungroup to remove the outline grouping. Neither action deletes the row contents.

What is the fastest way to group rows in Excel?
Select the detail rows and press Alt+Shift+Right Arrow in Excel for Microsoft 365 on Windows. If a dialog appears, choose Rows. The ribbon route is Data > Group.

Can I group rows that are not next to each other?
Not as one group. Excel outlines continuous ranges, so create a separate group for each block of rows. You can still use the outline level buttons to control multiple groups at once.

Can I group rows that contain formulas?
Yes. Grouping changes whether rows are displayed, not the formulas in them. Keep summary formulas outside the detail group when you want totals to remain visible in the collapsed view.

Does grouping work in Excel for Mac or Excel for the web?
Both offer row grouping through the Data ribbon, though the ribbon layout and shortcut behavior may differ. On Mac or in a browser, use Data > Group if the Windows keyboard shortcut is unavailable, and check that the sheet is editable.

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.