Excel Group Rows: How to Keep the First Row Visible

How-to basics · Updated November 19, 2026

Excel does not have a setting that keeps the first row inside a grouped range visible when you collapse the group. To keep that row on screen, leave it out of the group: for example, group rows 6–10 if row 5 should remain visible. When you collapse the group, Excel hides the grouped rows and leaves row 5 in place.

What happens when you group rows in Excel

Row grouping creates an outline: a way to hide and show related rows using controls beside the worksheet. In Excel for Microsoft 365 on Windows, select the rows, then choose Data > Outline > Group. If Excel asks whether to group Rows or Columns, choose Rows. A bracket and a minus button appear beside the grouped rows; clicking the minus collapses the group, and the plus button expands it again.

Collapsing a group hides every row included in that group. Excel does not automatically pick the first row as a label or treat it as a heading. If rows 5 through 10 are grouped together, all six rows are hidden when you collapse them. The row numbers are not deleted, and the values remain in the workbook; they are simply not displayed until the group is expanded.

Outline level buttons, usually numbered 1, 2, and so on above the row numbers, control how much detail is shown. Clicking a level hides groups below that level across the sheet. This is useful for a report with several layers of detail, but it does not change which rows belong to a particular group.

Keep the first row visible by grouping the rows below it

If the first row is a label, heading, or important detail that should remain visible, exclude it from the grouped range. For example, suppose rows 5–10 contain a project section and row 5 contains the project name. Select row headers 6 through 10 and group those rows. When the group is collapsed, row 5 stays visible while rows 6–10 are hidden.

This works because row 5 is not part of the outline group, not because Excel has a special keep-first-row option. It is a simple and reliable layout choice. It also makes the purpose clear to other people using the workbook: the ungrouped row acts as the visible summary, while the rows below it hold the detail.

  • To keep a section title visible, leave the title row outside the group.
  • To keep the first transaction visible, group the rows below that transaction.
  • To show a total while hiding detail, keep the total row outside the detail group and place it above or below the group as appropriate.

Check adjacent sections before grouping. If you group rows 6–10 and then group rows 12–16, rows 5 and 11 can serve as visible headings. A blank row between sections may help readability, but it is not required. The key is that the row you want to see must not be inside a collapsed group.

Steps to create a group on Windows

Use the row headers on the left of the worksheet so that the selection is unambiguous. If row 5 should remain visible and rows 6–10 should collapse, follow these steps:

  1. Click the row number 6, then drag down to row number 10. You can also click row 6, hold Shift, and click row 10.
  2. Choose Data > Outline > Group. If a dialog asks what to group, select Rows and confirm.
  3. Look for the outline bracket and minus button beside rows 6–10.
  4. Click the minus button to collapse the group. Row 5 should remain visible; click the plus button to show the grouped rows again.

Windows also provides shortcuts for grouping and ungrouping: select the rows and press Alt+Shift+Right Arrow to group, or Alt+Shift+Left Arrow to ungroup. If a shortcut is intercepted by a keyboard layout or another application, use the ribbon command instead. In Excel for Mac, use the Data tab and its Group command; available shortcuts can differ by Mac keyboard and Excel version, so the ribbon is the dependable route.

If the outline buttons are not visible, check whether outline symbols are enabled in Excel’s settings. On Windows, open File > Options > Advanced, find the display options for the worksheet, and make sure Show outline symbols if an outline is applied is selected. The exact position of this option can vary with the worksheet and Excel build.

Summary rows and the Summary rows below detail setting

Excel’s outline tools are often used with a summary row, such as a department total above or below its transactions. The worksheet setting called Summary rows below detail controls whether Excel expects summary rows to appear beneath the detail rows when outlining. On Windows, open the Data tab, then use the small dialog box launcher in the Outline group to open Settings. The Summary rows below detail checkbox controls that placement convention.

This setting is easy to misunderstand. It affects how summary rows relate to detail in an outline; it does not instruct Excel to keep the first detail row visible inside a collapsed group. If every row in a detail range is grouped, collapsing that range hides every row in it. To keep a heading or summary visible, place it outside the detail group, then check that the outline is arranged as intended.

For example, a sales report might have a store name in row 5, daily transactions in rows 6–20, and a total in row 21. If the store name and total should remain visible when transactions are hidden, group only rows 6–20. If the total is included in the group, it will be hidden too. The summary-row setting does not override that selection.

Nested groups and outline levels

Groups can be nested to show several degrees of detail. A monthly report, for instance, could group transaction rows within each week, then group the weekly sections within a month. The inner groups let someone collapse one week at a time; the outer group can hide the entire month. Excel displays multiple outline levels when the groups are structured in this way.

For nested outlines, decide which rows should remain visible at each level before creating groups. A month label can sit outside the outer group, while week labels can sit outside their individual transaction groups but still inside the month group. Collapsing a week then leaves its week label visible; collapsing the month hides the rows that belong to the month-level group. The same principle applies at every level: a row remains visible only if it is not included in the group being collapsed.

Plan the layout before adding several groups, especially if the worksheet already has hidden rows or outline levels. If the controls become confusing, use Data > Outline > Ungroup for the selected rows, or choose Clear Outline in the Outline commands to remove the outline structure. Clearing an outline does not erase cell contents, but it removes the grouping controls, so note the layout first if you may need to rebuild it.

Common problems and how to fix them

  • The row you wanted to keep disappears. It is probably included in the grouped range. Expand the group, ungroup it if necessary, and create a new group that starts on the next row.
  • The minus or plus control is missing. Confirm that rows were grouped rather than merely hidden, and check that outline symbols are enabled. Also look at the left edge of the sheet; symbols can be easy to miss when the row-header area is narrow.
  • Clicking an outline level hides more than one section. Level buttons apply to outline levels across the worksheet, not just the group beside a particular section. Use the plus or minus beside the individual group when you want to change only that section.
  • A row remains hidden after expanding a group. It may have been hidden separately, filtered out, or included in another collapsed group. Expand all outline levels, clear any active filters if appropriate, and inspect the row headers for hidden rows.
  • Grouping is unavailable or behaves unexpectedly. Check whether the worksheet is protected and whether the selection contains merged cells or other structures that complicate outlining. If the workbook came from another source, it may also contain existing outline levels. Save a copy before restructuring a complicated worksheet.

Grouping and filtering are different. A filter shows rows that match criteria and hides rows that do not; a group gives the user a manual expand-and-collapse control for a chosen section. If the goal is to show only records for one department, a filter may be more appropriate. If the goal is to fold away a block of detail while leaving a section label visible, grouping is usually the better fit.

When to use a different approach

If users need a compact view but also need to identify each section, a visible heading row outside each group is often the cleanest arrangement. For a large list that users need to search, sort, or filter, format the data as an Excel table and use filters instead of building many manual groups. Tables are especially helpful when new records are added, because their structured range can expand; outline groups are more tied to specific row positions and may need adjustment as the worksheet changes.

For a dashboard, consider placing a summary in a separate area and grouping only the supporting detail. This avoids relying on a hidden row to carry essential context. Another option is to use a PivotTable when the report needs interactive levels of detail by categories such as month, region, or product. A PivotTable has its own expand-and-collapse controls and is designed for summarizing and rearranging data, whereas ordinary row grouping simply hides and reveals the selected worksheet rows.

Choose based on what the reader needs to do. Manual grouping is straightforward for a fixed report and preserves the underlying worksheet layout. Filters are better for selecting records by criteria. Tables help maintain and analyze a growing list. PivotTables suit flexible summaries. None of these methods changes the central rule for ordinary row groups: a row inside a collapsed group is hidden, so keep the desired first row outside that group.

Frequently Asked Questions

Can Excel keep the first row of a group visible when I collapse it?
No. Excel hides all rows in the collapsed group. Group the rows below the one you want to keep visible, leaving that first row outside the group.

How do I show a heading while hiding the rows underneath it?
Put the heading on its own row, select only the detail rows below it, and choose Data > Outline > Group. Collapse the resulting group with its minus button.

Does Summary rows below detail keep the first row visible?
No. That outline setting concerns the placement of summary rows relative to detail. It does not preserve a detail row inside a collapsed group.

Can I group rows without hiding them right away?
Yes. Creating a group adds outline controls; the rows remain displayed until you collapse the group or use an outline level that hides its detail.

Will collapsing a group delete or change my data?
No. Collapsing hides rows from view but does not delete their cell contents. Expand the group to display them again. Filters, hidden rows, and other outline groups can also affect what is currently visible.

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.