Group and Ungroup Rows in Excel: Full Guide

How-to basics · Updated November 23, 2026

To ungroup rows or columns in Excel, select the grouped range, go to Data > Ungroup > Ungroup, or press Shift+Alt+Left Arrow (Windows) / Command+Shift+J (Mac). This removes the outline and the collapse/expand buttons, but does not delete any data.

What Grouping Does in Excel

Excel’s Group feature creates an outline that lets you hide or show a set of rows or columns with a single click. It is part of the Outline tools on the Data tab. When you group rows 2 through 10, Excel adds a bracket on the left side of the row numbers, with a minus sign (–) that collapses the group and a plus sign (+) that expands it again. The same works for columns, with the bracket appearing above the column letters.

Grouping is purely visual and organizational. It does not merge cells, alter values, or change formulas. You can group multiple non-adjacent ranges, create nested groups (groups inside groups), and apply grouping to both rows and columns in the same sheet.

How to Ungroup Rows or Columns

There are three main ways to ungroup, and each works for rows and columns.

  • Ribbon method: Select the rows or columns that are grouped (click and drag the row numbers or column letters), then go to Data > Ungroup > Ungroup.
  • Keyboard shortcut (Windows): Select the grouped range and press Shift+Alt+Left Arrow. On a Mac, the shortcut is Command+Shift+J.
  • Right-click method: Right-click the selected rows or columns and choose Ungroup from the context menu.

If you have nested groups, Excel will ungroup only the innermost level each time you use the command. Repeat the command to remove outer levels. To remove all grouping at once, select the entire sheet (Ctrl+A twice, or click the corner triangle above row 1 and left of column A), then go to Data > Ungroup > Clear Outline. This removes every group and the outline symbols in one step.

Ungroup vs. Clear Outline

Many users confuse these two commands. Ungroup removes the grouping from a specific selected range, leaving other groups intact. Clear Outline removes all grouping from the entire worksheet, regardless of what you have selected. Clear Outline also removes any outline symbols and the column/row brackets, but it does not unhide rows or columns that were hidden by grouping—those stay hidden until you manually unhide them.

If you want to ungroup but keep the rows visible, simply ungroup; Excel automatically shows all rows in that group. If you want to hide the outline symbols but keep the grouping functionality, you can go to File > Options > Advanced and uncheck “Show outline symbols if an outline is applied” under the Display options for this worksheet section. This hides the buttons but the groups still work with keyboard shortcuts.

Common Problems and Fixes

Here are the most frequent issues people hit when trying to ungroup.

  • Ungroup is greyed out: This usually means you have not selected a range that is actually grouped, or you have selected entire rows/columns that are not part of a group. Click on a single cell inside the grouped range, then try again.
  • Only one level ungroups at a time: With nested groups, Excel ungroups the innermost level first. You must repeat the command for each level. To remove all levels, use Clear Outline.
  • Rows stay hidden after ungroup: If you ungroup while rows are collapsed, they remain hidden. Manually select the hidden rows (e.g., click row 2, hold Shift, click row 10) and go to Home > Format > Hide & Unhide > Unhide Rows.
  • Grouping applied to a table or PivotTable: The Data tab grouping works only on normal ranges. If you are trying to ungroup dates in a PivotTable, you must right-click the date field and choose Ungroup from the PivotTable tools, not the Data tab.

Grouping vs. Hiding Rows Manually

Grouping is often compared to manually hiding rows by right-clicking and choosing Hide. The key difference is that grouping gives you a one-click toggle to show or hide multiple ranges at once, and it keeps the outline visible so you know what is collapsed. Manual hiding has no toggle button; you must unhide each row individually by selecting the surrounding rows and using Unhide. If you only need to hide a few rows temporarily, manual hiding is simpler. If you regularly collapse and expand sections of a report, grouping is more efficient.

Another difference: grouping can be nested, so you can have a main group and sub-groups. Manual hiding cannot be nested in any meaningful way. Also, when you copy a grouped range to another sheet, the grouping is not copied—only the values and formatting are copied. Manual hidden rows are also not copied if you copy the visible range only.

How to Group Effectively (and When to Ungroup)

Grouping works best for large datasets where you want to hide detail rows but keep a summary visible. For example, a monthly budget sheet might have a row for each day (rows 2–31) and a subtotal row (row 32). Group rows 2–31 so you can collapse to just the subtotal. To create that group, select rows 2–31, go to Data > Group > Group, and choose Rows.

You should ungroup when the structure changes—for instance, if you delete a row that is part of a group, Excel keeps the group but adjusts the range. If you add new rows inside a group, they are automatically included. But if you reorder rows so the group no longer makes sense, ungroup and regroup. Also, before sharing a workbook with someone who is not familiar with Excel, consider clearing all outlines to avoid confusion.

One common misconception is that grouping affects sorting or filtering. It does not. You can sort and filter data within groups without breaking the outline, though sorting may move rows out of the group if you sort the entire sheet. To avoid that, sort only the data range, not the outline area.

Excel for Mac and Web Differences

On Excel for Mac, the ribbon path is the same: Data > Ungroup. The keyboard shortcut is Command+Shift+J (not the Windows Alt shortcut). In Excel for the web, grouping is available under Data > Group and Data > Ungroup, but the keyboard shortcut is not supported. The web version also lacks the Clear Outline command, so you must ungroup each range manually. Also, in the web version, grouping is only available for rows, not columns—this is a known limitation.

Frequently Asked Questions

Why is the Ungroup button greyed out in Excel?
This happens when you have not selected a range that is part of a group. Click a single cell inside the grouped range (or select the grouped rows/columns) and the button will become active. If you have selected an entire sheet, the button may also be greyed out unless you select a specific group first.

Does ungrouping delete any data or formulas?
No. Ungrouping only removes the outline structure. All cell values, formulas, and formatting remain exactly as they were. The only thing that changes is the ability to collapse/expand that range.

How do I ungroup all rows at once?
Select the entire sheet by clicking the triangle at the top-left corner (where row numbers and column letters meet), then go to Data > Ungroup > Clear Outline. This removes all groups in one step. If you only want to ungroup all rows but keep column groups, you can select all row numbers first, then use Ungroup.

Can I ungroup columns the same way as rows?
Yes. Select the column letters that are grouped, then use the same commands: Data > Ungroup > Ungroup or the keyboard shortcut. The only exception is Excel for the web, which does not support column grouping at all.

What is the difference between Ungroup and Clear Outline?
Ungroup removes the group from the selected range only. Clear Outline removes all groups from the entire worksheet. Clear Outline also removes any outline symbols, but it does not unhide rows that were hidden by grouping—you must unhide them manually.

How do I ungroup dates in a PivotTable?
Right-click any date cell in the PivotTable, choose Ungroup from the context menu. This removes the date grouping (e.g., months or quarters) and returns the dates to their original daily granularity. This is separate from the Data tab grouping.

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.