Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Use the Excel Group Feature: Rows, Columns & Data

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Excel's Group feature lets you collapse sets of rows or columns into a single outline level, so you can hide detail and expand it again with one click. To group rows or columns, select them, then go to Data > Group (or press Shift+Alt+Right Arrow); to undo it, use Data > Ungroup or Shift+Alt+Left Arrow. There is also a separate Group By feature in Power Query and the Data tab's outline tools for automatic grouping of summarized data. This guide covers the standard row/column grouping, which is what most people mean, and it works the same in Excel for Windows and Mac. Menu labels can differ slightly between versions, so if a button name does not match exactly, look in the Data tab's Outline section.

What You'll Need

  • A spreadsheet in Excel (desktop version for the keyboard shortcuts; the web version supports grouping via the Data tab but with fewer options)
  • Data organized so each group is a contiguous block of rows or columns
  • Optionally, a summary row or column (subtotal or total) for each group if you want Excel's automatic outlining

Step-by-Step

Group rows or columns manually

  1. Open your workbook and click into the sheet containing the data.
  2. Select the rows you want grouped by dragging across the row numbers on the left (or column letters at the top). For non-adjacent groups, hold Ctrl while selecting, but note that Ctrl-select works best for cells, not whole rows.
  3. Go to the Data tab and click Group in the Outline section. Alternatively press Shift+Alt+Right Arrow.
  4. If Excel asks whether to group rows or columns, choose the correct one. This prompt appears when you selected cells rather than entire rows or columns.
  5. Repeat for any other groups you need.
  6. Use the minus (–) buttons in the left margin (or above columns) to collapse a group, and the plus (+) buttons to expand it again.
  7. Use the outline level numbers (1, 2, 3...) at the top-left of the sheet to collapse or expand all groups at once.

Create nested groups

  1. Group the inner (detail) rows first as above.
  2. Select a larger block that includes the first group plus its surrounding rows.
  3. Press Data > Group again. Excel creates a second outline level around the first.
  4. Repeat to add further levels; Excel supports up to eight nested levels.

Auto Outline (grouping for summarized data)

  1. Make sure each block of detail rows has a summary row (such as a SUBTOTAL or SUM row) directly below or above it.
  2. Select any cell in the data range.
  3. Go to Data and click the small arrow on the Group dropdown (or in some versions, Data > Outline settings) and choose Auto Outline.
  4. Excel builds the groups automatically. If nothing happens, your summary rows are probably missing or formulas do not reference the detail cells above them.

Remove grouping

  1. Select the grouped rows or columns.
  2. Press Data > Ungroup or Shift+Alt+Left Arrow. To clear everything at once, choose Clear Outline from the same dropdown.

Common Mistakes

  • Selecting cells instead of whole rows. If you select only part of a row, Excel groups columns instead. Select by clicking the row numbers.
  • Grouping non-adjacent rows and expecting one group. Ctrl-selected areas become separate groups, and the behavior is inconsistent; group contiguous blocks.
  • Putting the summary row inside the group. When collapsed, the total disappears. Leave the summary row just outside the group.
  • Forgetting grouped rows stay hidden when saved. Collapsed groups save in that state, so colleagues may open the file and think data is missing.
  • Applying Auto Outline to data with no summary formulas. Excel has nothing to key off, so no outline is created.

Tips

  • Keep outline symbols visible: check File > Options > Advanced and, under "Display options for this worksheet", make sure "Show outline symbols" is enabled if the +/– buttons vanish.
  • Press Alt+Shift+\ (on some keyboard layouts) or use Data > Ungroup dropdown options to clear an outline fast.
  • Combine grouping with SUBTOTAL(109,...) or AGGREGATE functions so visible-only totals update as you collapse and expand.
  • Grouping works well with pivot tables too: right-click a pivot item and choose Group to bucket dates into months or numbers into ranges.
  • Name groups implicitly by putting a header row above each group and keeping it outside the collapse.

Troubleshooting

  • The Group button is grayed out. The sheet is probably protected. Go to Review > Unprotect Sheet (you may need the password), or group before protecting.
  • No +/– outline buttons appear. Re-enable outline symbols under File > Options > Advanced as described in Tips, or widen the formula/name box area, which can hide them.
  • Grouped the wrong thing. Press Ctrl+Z immediately, or select the area and use Data > Ungroup.
  • Rows seem to have vanished. They are collapsed, not deleted. Click the plus buttons or the highest outline level number, or press Ctrl+Shift+( to unhide everything hidden by grouping.
  • Auto Outline does nothing. Confirm each detail block ends with a formula (SUM, SUBTOTAL) referencing those rows, and that there are no completely blank rows inside blocks.
  • Grouping behaves oddly in Excel for the web. The web version supports basic group/ungroup from the Data tab but not Auto Outline or Clear Outline; use the desktop app for those.

Frequently Asked Questions

What is the keyboard shortcut for grouping in Excel?

Shift+Alt+Right Arrow groups the selection; Shift+Alt+Left Arrow ungroups. These work in Excel for Windows and Mac.

Can I group rows based on a column value automatically?

Not with the standard Outline feature. Use a pivot table (right-click items in a field > Group) or Power Query's Group By transformation to aggregate by a category automatically.

Does grouping hide the data permanently?

No. Collapsed rows are only hidden and return when you expand the group. Deleting is a separate action; grouping never removes content.

How many outline levels can I have?

Excel supports up to eight nested outline levels per sheet.

Will groups survive copying to another sheet?

Yes, if you copy entire rows or columns; the outline structure is carried with them. Copying cells only does not carry grouping.

Can I group non-adjacent rows into a single group?

No. Groups must be contiguous blocks. If you need scattered rows together, sort or restructure the data first so the rows sit next to each other.