To group rows in Excel, select the rows you want to group by clicking their row numbers, then go to the Data tab and choose Group in the Outline section. A bar with a minus sign appears in the left margin; click it to collapse the rows and the plus sign to expand them again.
Grouping is what you want when a sheet has detail you only need now and then. Think of a stock list with each supplier's items underneath a supplier heading, or an orders log broken down by week. Collapse the groups and you see just the headings; expand one and the detail is right there. Excel calls this an outline, and it's far tidier than hiding rows and forgetting where they went.
Grouping rows in four steps
- Check your data has a header row and no completely blank rows or columns in the range. Microsoft lists both as requirements for a clean outline.
- Click the row number of the first detail row, hold Shift and click the last, so the whole rows are selected.
- Go to Data, then Outline, then Group.
- A bracket and a minus button appear in the margin. Click the minus to collapse the group.
Because you selected whole rows, Excel groups them straight away. Microsoft notes that if you select just cells instead, a small dialog asks whether to group rows or columns; choose Rows and select OK.
Leave the heading row out of the group
This is the bit that trips people up. Only select the detail rows, not the heading or total row that describes them. If Supplier A sits in row 2 with its items in rows 3 to 7, group rows 3 to 7. Collapse it and row 2 stays visible as the label.
Excel expects summary rows below the detail by default. If your headings or totals sit above the detail, as they often do in a stock sheet, Microsoft says to open the Outline dialog box launcher (the small arrow in the corner of the Outline group) and untick Summary rows below detail. Otherwise the plus and minus buttons end up next to the wrong row.
Building groups inside groups
You can nest groups to make levels. Microsoft says an outline can have up to eight levels. For a delivery log you might group each day's deliveries, then group a whole week around those days. The numbered buttons at the top of the margin, 1, 2, 3 and so on, collapse everything to that level in one click.
| Control | What it does |
|---|---|
| Minus button | Collapses that group |
| Plus button | Expands that group |
| Level 1 button | Shows only the top-level rows |
| Highest level button | Shows every row |
| Alt+Shift+= / Alt+Shift+- | Shows or hides the detail for the selected group |
Letting Excel build the outline for you
If your sheet already has subtotal rows with SUM formulas, try Data, Outline, Group, Auto Outline. Excel looks at where the formulas are and groups the detail rows above them. Alternatively, the Subtotal command on the Data tab inserts subtotal rows for each change in a column, such as each supplier, and creates the outline as it goes. Sort the list by that column first.
Ungrouping and clearing an outline
To remove one group, select its rows and choose Ungroup next to Group on the Data tab. To remove every group, use Ungroup, then Clear Outline. Clearing the outline doesn't delete any data; it just removes the brackets and buttons, and any collapsed rows may stay hidden, so expand everything first.
When the plus and minus buttons vanish
If you've grouped rows but can't see the buttons, the outline symbols are switched off. Microsoft's shortcut Ctrl+8 toggles them, or go to File, Options, Advanced and tick Show outline symbols if an outline is applied. There's also a neat mouse trick in Microsoft's shortcut list: hover over grouped rows, hold Shift and scroll down to expand or up to collapse.
Grouping versus hiding
Both hide rows, but grouping leaves a visible marker and a one-click way back. Hidden rows only show a thin double line that's easy to miss. If anyone else uses your file, I'd group rather than hide. And when you're working out averages for each group once it's collapsed, my guide to dividing in Excel covers the formulas. For summaries that build themselves, a pivot table is the natural next step up from grouping.
Want AI doing the heavy lifting in your marketing?
I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.
Grouping columns works the same way
Everything above applies to columns too. Select whole column letters, such as monthly quantity columns you only check now and again, and choose Group. The bracket appears above the column letters instead of beside the row numbers. Microsoft says you can outline rows, columns or both on the same sheet, so a stock list could fold up by supplier down the side and by month across the top.
A practical tip: do your grouping last, once the layout has settled. Inserting rows inside a group usually extends it, but inserting rows right at the edge can leave them outside, and you'll end up regrouping. Five minutes of tidying at the end beats untangling an outline later.
My take
Select only the detail rows, use Data, Group, and check where Excel expects the summary row. Do that and your sheet folds up neatly. I'd use groups on any list with natural sections, because the person opening it after you will thank you.
Frequently asked questions
What is the shortcut to group rows in Excel?
Select the rows and use Data, Group. Microsoft's shortcuts Alt+Shift+= and Alt+Shift+- show or hide the detail of a group.
How many levels can I group in Excel?
Microsoft says an outline can have up to eight levels.
Why are my plus and minus buttons next to the wrong row?
Excel assumes summary rows sit below the detail. Untick Summary rows below detail in the Outline settings if yours are above.
How do I ungroup rows in Excel?
Select the grouped rows and choose Ungroup on the Data tab, or use Clear Outline to remove every group.


