Yes—Excel can keep a top row visible when you group rows, but the row must be outside the group so it can act as a summary row. If you include that top row in the grouped detail, collapsing the group hides it along with the other selected rows.
What “show the top row” means
People asking whether Excel group rows show the top row may mean one of two things: they want a heading or total to remain visible above collapsed detail, or they want to know whether Excel automatically displays the first row in a group. The key distinction is whether the row is part of the group. Excel does not automatically protect the first selected row from being hidden.
A grouped outline lets you collapse several rows into a smaller view and expand them again when you need the details. When collapsed, Excel hides the rows in the detail group. Any summary row outside that group remains visible. For example, if row 2 contains a department total and rows 3–7 contain employee transactions, group rows 3–7—not row 2—to keep the total visible.
The outline symbols, usually plus and minus buttons beside the row numbers, control whether grouped details are shown. They do not change which rows belong to the group. That is determined when you create the group or adjust it later.
Keep a top summary row visible
Suppose a worksheet has a heading in row 1, a subtotal in row 2, and five detail rows in rows 3–7. To collapse the details while keeping the heading and subtotal on screen, select only rows 3–7 before grouping them.
- Select the row numbers for the detail rows you want to collapse. In this example, select rows 3 through 7.
- On the ribbon, choose Data > Outline > Group > Group. If Excel asks whether to group rows or columns, choose Rows.
- Use the minus button beside the grouped rows to collapse them. The detail rows disappear, while rows 1 and 2 remain visible.
- Click the plus button to expand the group and show the detail again.
If your intended summary row is above the details, keep it out of the selected range. For a summary row below the details, leave that bottom row outside the group instead. The important rule is the same in either arrangement: group the detail, not the summary you want to see while the detail is hidden.
How Excel decides which rows are hidden
Grouping adds an outline structure to the worksheet. A group contains detail rows, and Excel can hide those rows when you collapse the outline. The surrounding rows are not hidden just because they are near the group. This is why a title row above a group normally stays visible, provided it was not selected as part of the group and is not hidden for another reason.
Excel may display outline level buttons labeled 1, 2, and so on above the row numbers. Choosing a lower level shows a more condensed view of the outline; choosing a higher level reveals more detail. With a simple single-level group, level 1 generally shows the most condensed view and level 2 shows the detail. In a nested outline, the numbers represent progressively deeper levels.
Excel also has a setting called “Summary rows below detail.” It controls which side of the detail Excel expects summary rows to occupy; it does not automatically move a row or guarantee that a particular row stays visible. In the Data tab’s Outline group, open the Outline Settings dialog with its dialog box launcher and check or clear “Summary rows below detail” to match the layout. If you change this setting, inspect the outline afterward: the row selection and group boundaries still determine what collapses.
Create groups that match your worksheet layout
Before grouping, identify the detail range and the row that should summarize it. A useful pattern is to put a subtotal above or below a block of related records, then group only the records. For example, a monthly report might place a “January total” row before January’s transactions. Group the transaction rows, leaving the total outside the group. The collapsed sheet then presents the monthly total without taking up space for every transaction.
To create several separate groups, select and group each detail block separately. If rows 3–8 are January details and rows 11–16 are February details, create one group for rows 3–8 and another for rows 11–16. Keep any month labels or totals outside the corresponding detail ranges if they need to remain visible.
You can also create nested groups, such as individual weeks inside a month. Group the smaller detail ranges first, then group the broader range if needed. Nested outlines can be useful for reports, but they make it especially important to check which rows are included at each level. Collapse and expand the outline buttons one level at a time to confirm that the intended summaries remain on screen.
Why the top row disappears
The most common reason is that the top row was included in the selection when the group was created. For instance, selecting rows 2–7 groups row 2 along with rows 3–7. If row 2 contains the subtotal you wanted to preserve, Excel will hide it when that group collapses. Expand the group, ungroup the incorrect range, and create a new group that excludes row 2.
Other causes can make the result look similar:
- The row is hidden separately. A row can be hidden manually or by a filter even when it is not part of a collapsed group. Expand the outline and check the row numbers for gaps.
- A filter is active. Filters hide rows that do not meet the criteria. Clear or adjust the filter to see whether the missing row returns.
- The entire outline is collapsed. Clicking outline level 1 can hide detail at several levels, not just the group you were focused on. Select a higher level or use the group’s plus button to reveal more rows.
- Outline symbols are not displayed. If the plus and minus controls are missing, the outline may still exist. In Excel for Microsoft 365 on Windows, check File > Options > Advanced > Display options for this worksheet and enable “Show outline symbols if an outline is applied.”
When the layout is confusing, first expand all groups so that every row is visible. Then inspect the row numbers and identify the exact summary and detail ranges before changing the outline.
Fix or remove an incorrect group
To undo a mistaken grouping, select the affected rows and choose Data > Outline > Ungroup > Ungroup. If Excel asks whether you are ungrouping rows or columns, choose Rows. Then select only the detail rows and group them again. This is usually clearer than trying to repair a group while it is collapsed.
If you want to remove the outline structure from the worksheet, use Data > Outline > Ungroup > Clear Outline. This removes the outline levels, so use it only when you intend to remove all grouping from the sheet. It does not delete the worksheet’s cell contents, but it also does not preserve the group structure for later expansion.
On Excel for Mac, grouping is also available from the Data tab, though ribbon layout and shortcut behavior can differ from Windows. Excel for the web may present fewer outline controls than the desktop app. If a specific outline setting or command is not available in your version, open the workbook in the Microsoft 365 desktop app to adjust it.
Grouping compared with hiding rows
Grouping and manually hiding rows both make detail disappear, but grouping is designed for structured, reversible summaries. A group adds outline controls and can be expanded with a plus button or shown at different outline levels. Manually hidden rows do not provide those group controls, so another person may not immediately know that detail is available.
Use grouping when you want readers to move between a summarized view and the underlying rows. Use ordinary hiding when you have a simpler reason to temporarily remove rows from view and do not need outline levels. Neither method is a security feature: someone with access to the workbook may be able to reveal hidden or grouped content. Do not use row grouping to protect confidential data.
Frequently Asked Questions
Does Excel automatically keep the first row in a group visible?
No. Excel hides the rows included in a collapsed group. To keep a first or top summary row visible, leave it outside the group and group only the detail rows.
How do I show a subtotal above grouped rows?
Place the subtotal above the details, select only the detail row numbers, and choose Data > Outline > Group > Group. Collapse the group with its minus button; the subtotal remains outside the hidden detail.
Can I show the top row after I have already grouped it?
Yes. Expand the group, ungroup the range that includes the summary row, and create a new group containing only the detail rows. Changing the “Summary rows below detail” setting alone does not remove a summary row from an existing group.
Why can’t I see the plus and minus buttons?
The outline symbols may be turned off, or the outline may have been cleared. In Excel for Microsoft 365 on Windows, check File > Options > Advanced and enable “Show outline symbols if an outline is applied” for the worksheet. Also confirm that rows are still grouped.
Can I group rows without hiding the top summary?
Yes. Select only the detail rows when creating the group. A heading, label, or subtotal outside the selection stays visible when the group is collapsed, unless it is hidden separately by another setting or action.
Related
- Excel Data Validation Examples and Setup Tips
- Excel Data Validation Drop-Down Not Showing? Fixes
- Excel Data Validation Dynamic List: Setup and Tips
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Delete a Next Page Section Break in Microsoft WordTo delete a Next Page section break in Word, show formatting marks with Home > ¶, locate the…
- Ctrl+E in Excel: Flash Fill Shortcut and How It WorksIn Excel for Microsoft 365 on Windows, Ctrl+E runs Flash Fill: it detects a pattern in your examples…
- Excel Cell Margins: Add Top and Bottom SpaceExcel does not have a separate top or bottom cell-margin setting. To create space inside a cell, adjust…
- Google Sheets Merge Cells: How It WorksYes. Google Sheets lets you merge adjacent cells in a web browser: select the cells, then choose Format…
- How to Remove a Filter in Google SheetsTo remove a standard filter in Google Sheets, open the sheet in a web browser, select the tab…
- How to Delete a Numbered Page in WordTo delete a page that has a page number in Word, remove the page’s content and any page…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.