Yes. In Excel for Microsoft 365 on Windows, select the detail rows and choose Data > Group to create a collapsible row group. To put the summary row above the detail instead of below it, open the Outline settings and clear Summary rows below detail; grouping itself does not move rows.
What “group rows upwards” means in Excel
Excel’s row grouping feature creates an outline: related rows can be hidden or shown together with the outline controls beside the worksheet. It does not have a separate command called “group upwards.” The phrase can mean either grouping a set of rows, or arranging a summary row above the rows it summarizes. These are related but different tasks.
A common layout is a heading or total row followed by its detail. For example, a monthly total might appear on row 5, with the individual transactions on rows 6 through 12. You can group rows 6 through 12 so that the transaction detail collapses while the total remains visible. Set the worksheet’s outline direction so summary rows are above detail, then create the group.
If instead you mean moving selected rows to a higher position in the sheet, grouping is not the tool for that. Cut and insert the rows where they belong, or drag the row headers. Grouping changes visibility and structure; it does not reorder data.
Set summary rows above the detail
In desktop Excel for Microsoft 365 on Windows, change the outline setting before creating the groups. This setting controls whether Excel treats summary rows as above or below the associated detail. It does not automatically insert a total or move an existing row, so prepare the summary row in the worksheet first.
- Open the Data tab.
- In the Outline group, click the small dialog box launcher at the lower-right of the group.
- In the Outline settings, clear Summary rows below detail.
- Click OK.
- Select the detail rows, leaving the summary row outside the selection, and choose Data > Group.
For example, suppose row 5 contains a department total and rows 6–12 contain that department’s entries. Select rows 6–12 and group them. Row 5 remains visible as the summary, while the detail beneath it can be collapsed. If a worksheet has several summary sections, apply the same pattern to each set of detail rows.
The setting is about the outline relationship, not cell formatting or calculation. If row 5 needs to display a total, you must enter or calculate that total separately. And if an existing outline was created with a different arrangement, changing the setting does not necessarily reorganize all existing groups; review the outline and recreate or adjust groups as needed.
Create a row group in Excel
Once the summary placement is right, group the rows that belong together. Select entire row headers when practical, or select cells across the rows you want to group. Keep the selection to a contiguous block: an outline group is a run of neighboring rows, not a collection of scattered rows.
- Click the number for the first detail row, then drag down to the last detail row. To select a range, you can also click the first row header, hold Shift, and click the last.
- Choose Data > Group. If Excel asks whether to group rows or columns, choose Rows.
- Look for the bracket and outline control in the margin beside the row numbers. Use the minus control to hide the grouped detail; use the plus control to show it again.
For instance, if rows 6–12 hold weekly sales entries and row 5 holds their total, grouping rows 6–12 lets someone read the total without seeing every entry. The values remain in the sheet when hidden; grouping only changes what is displayed. Formulas that refer to hidden cells generally still calculate from them, although functions designed to ignore hidden rows, such as SUBTOTAL in some calculation modes, can behave differently.
On Windows, Alt+Shift+Right Arrow groups the selected rows, and Alt+Shift+Left Arrow ungroups them. The ribbon path is often easier to remember and avoids keyboard-layout differences. Excel for Mac has its own shortcut mappings; use Data > Group in the ribbon if the Windows shortcut does not apply. Ribbon labels can vary slightly by platform or update.
Use nested groups for several levels
Outlines can have multiple levels. You might group transaction rows by week, then group several weekly blocks into a month. The outline level buttons—usually numbered 1, 2, and so on—let you show a broader or more detailed view. At the top level, Excel can display only the highest-level summaries; choosing a lower level reveals progressively more detail.
For a simple hierarchy, make the smallest groups first and then create a larger group around the relevant rows. A monthly sheet could have weekly totals above each week’s transactions, plus a monthly total above the weekly sections. Keep summary rows outside the detail block they summarize. If the ranges overlap in an unintended way, the outline may be difficult to use, so plan the row layout before building several levels.
Nested grouping is useful for reports that need both an overview and drill-down detail. It is not a replacement for sorting or filtering: groups hide rows according to a planned structure, whereas filters show rows matching criteria. You can use both, but check how the visible outline and filtered results interact before sharing a report.
Grouping is not the same as moving rows
A frequent misunderstanding is that “group upwards” moves the selected rows upward in the worksheet. It does not. The group’s plus/minus control changes whether its rows are visible, and the outline bracket indicates which rows belong together. The row numbers and the underlying order remain unchanged.
To actually move a block, select its row headers, cut them, right-click the destination row header, and choose Insert Cut Cells where available. Alternatively, select the row headers and drag the border of the selection to a new position. Take care not to overwrite data or split formulas that rely on the original layout. If the goal is simply to see totals first, placing the summary row above and grouping the detail below is usually clearer than rearranging the data.
Grouping also differs from hiding rows manually. Manually hidden rows have no outline levels and may not show a group bracket or numbered levels. Use Data > Ungroup to remove a group while keeping its rows, or use the row context menu’s unhide command when rows were hidden individually.
Collapse, expand, and remove groups
Click the minus sign beside a group to collapse it and the plus sign to expand it. The numbered outline buttons at the upper-left of the worksheet collapse or expand groups to a chosen outline level. If the controls are missing, first check whether the sheet has an outline and whether outline symbols are enabled for that worksheet in Excel’s advanced display options.
To remove one grouping level, select the grouped rows and choose Data > Ungroup. If prompted, choose rows. The data stays in place; only the outline grouping is removed. To remove every outline group on the worksheet, use the Ungroup menu in the Outline area and choose Clear Outline. Clearing an outline does not delete the worksheet’s values, but it removes the group structure, so avoid it if you only wanted to expand a section temporarily.
When a worksheet is protected, permissions or protection settings may prevent grouping and outlining. In that case, ask the workbook owner to allow outline actions or unprotect the sheet if authorized. Do not assume that a missing control means the rows were deleted.
Common problems and fixes
- The wrong rows disappear. Expand the group, inspect the row numbers, then regroup only the intended contiguous detail rows. Make sure the summary row is not included in the selection.
- The summary appears below, not above. Check Data > Outline settings and clear Summary rows below detail before creating or rebuilding the group. The setting does not move summary values for you.
- There is no plus or minus control. Confirm that a group exists and that outline symbols are displayed. Also check whether the worksheet is protected or whether the group was removed.
- Group is unavailable or has no effect. Select a valid adjacent range of rows rather than separate, noncontiguous selections. If the sheet is protected, the workbook owner may need to change its permissions.
- Only some rows collapse. Check for nested groups or an existing outline level. Use the numbered level controls to see whether a higher-level group is also present.
Before making a complex outline, save a copy of the workbook or use a small test range. This is especially helpful when the worksheet already contains filters, hidden rows, subtotals, or several outline levels.
When to use grouping instead of another feature
Grouping is a good choice when a report has a stable hierarchy and readers need to switch between a summary and its underlying rows. A department report with a total above each department’s employee records is a typical example. It preserves the detail in place and gives the reader a simple expand-and-collapse control.
Use filters when readers need to find records by changing conditions, such as showing only sales from a particular region. Use sorting when the important task is changing the order of records. Use Excel’s Subtotal feature when you want Excel to insert subtotal rows and create an outline based on sorted data; it is not identical to manually grouping existing rows. For a PivotTable report, use its expand-and-collapse controls and layout options rather than assuming ordinary worksheet grouping will manage the PivotTable’s internal categories.
Choose based on how the workbook will be maintained. Manual outlines are straightforward for a fixed report, but they may need updating when rows are inserted or the report’s structure changes. Filters and PivotTables are generally more suitable when the data is refreshed or explored repeatedly.
Frequently Asked Questions
Can I group rows above another row in Excel?
Yes. To keep a summary row above its detail, clear Summary rows below detail in the Outline settings, then group the detail rows beneath the summary. Excel will not create the summary calculation automatically.
Does grouping rows move them upward?
No. Grouping creates a collapsible outline and leaves the rows in their original positions. To change their order, move the rows separately with cut-and-insert or a careful drag.
Can I group non-adjacent rows?
Not as one ordinary outline group. Select a contiguous block for each group. Separate blocks can have separate groups, and those groups can sometimes be placed inside a larger group to create levels.
How do I expand all grouped rows?
Click the outline level button that shows the most detail, commonly the highest-numbered level at the upper-left of the sheet, or click each group’s plus sign. The exact level numbers depend on how many outline levels exist.
Will collapsing a group delete its data?
No. Collapsing hides the rows from view but keeps their contents in the worksheet. Expand the group to display them again; use Ungroup only when you want to remove the outline structure.
Related
- Excel Custom Print Area: Set, Adjust, and Troubleshoot
- Excel Continually Not Responding? Causes and Fixes
- Excel Named Range to Table: What Works and What Doesn’t
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 Add a Draft Watermark in Word on Every PageTo add a Draft watermark in Word for Microsoft 365 on Windows, open the document and choose Design…
- Why Can’t I Merge Cells in Google Sheets?You usually can’t merge cells in Google Sheets because the selection is not one editable, continuous range, you…
- Excel SWITCH Greater Than: Test Ranges and ConditionsExcel’s SWITCH function cannot use a greater-than sign as a direct match test, but it can evaluate greater-than…
- Excel Data Validation Default Value ExplainedExcel data validation has no setting that automatically chooses a default value for a cell. To give a…
- Google Sheets Meal Prep Planner: Set One Up EasilyYes. Google Sheets can work as a flexible meal prep planner for weekly menus, recipes, serving counts, shopping…
- Excel Column Hide Shortcut Key: Windows and MacIn Excel for Microsoft 365 on Windows, select the column or columns you want to hide and press…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.