How to Collapse Rows in Excel

If you just need to collapse rows in excel and move on, the boxed answer at the top is all you need. The rest of this page is for when you want to understand why it works in Excel, adapt it to a trickier version, or make it robust enough to hand to a colleague. We keep the opening short on purpose — the depth is here when you want it, not in your way when you don’t.

Exact answer

In Excel: select the rows or columns, go to Data ▸ Outline ▸ Group (Alt+Shift+→ on Windows), and a collapsible bar with a − button appears in the margin so you can fold the detail away; ungroup with Data ▸ Ungroup (Alt+Shift+←).

On this page7
Annotated stepsExcel
1

Select the whole rows or columns you want to group by their headers.

2

Go to Data ▸ Outline ▸ Group, or press Alt+Shift+→ (Windows).

3

Click the − button in the margin to collapse the group, + to expand it.

4

Use the 1-2-3 outline level buttons to fold the whole sheet at once.

5

To remove a group, select it and choose Data ▸ Ungroup (Alt+Shift+←).

Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

What this does

Grouping ties a block of rows or columns together into a collapsible outline. Excel draws a bracket in the margin to the left of grouped rows (or above grouped columns) with a − button to collapse the detail and a + button to expand it again. You can nest groups inside groups, and the 1-2-3 outline level buttons in the top-left jump the whole sheet to a chosen depth. Nothing is deleted — collapsing only hides the detail from view. Grouping sheets is different: Ctrl-click sheet tabs to edit several tabs at once. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “collapse rows in excel”. Start on a copy or a tiny sample, keep the affected rows visible, and compare the result with the tool above before you touch the real workbook. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. The point is a layout choice that keeps the sheet readable and sortable, but the practical win is that someone else can open the file and understand what happened without asking you.

A worked example

Rows 2:10 hold line-item detail under a subtotal in row 11. Select row headers 2 through 10, go to Data ▸ Group, and a collapse bar appears in the left margin. Click the − button and rows 2:10 fold away, leaving just the subtotal; the 1 and 2 buttons at the top switch the entire outline between summary-only and full detail. Grouping turns a long detailed sheet into a tidy summary you can drill into, which is ideal for reports with subtotals and nested sections. When the result is not what you expected, undo straight away rather than repairing it by hand — undo restores the sheet exactly, while manual fixes tend to leave small inconsistencies behind that surface later.

In Google Sheets

This is a command rather than a formula, so there is no syntax to carry over. Google Sheets arranges its commands in menus across the top instead of a ribbon, names some of them differently and does not have every Excel command — look for the equivalent in the Sheets menus or its help before assuming the steps match. Nothing on this page is behind a login or a download: the exact answer is at the top, and the detail below it is there for when you need it. That is the whole promise here — the answer first, and just enough context to make it stick. Treat “collapse rows in excel” as a routine rather than a one-off. Once you know which setting or command controls it, the same few steps handle every workbook where it comes up in Excel, and you can explain them to a colleague in a sentence.

Common mistakes

  • Selecting cells instead of whole rows or columns before grouping.
  • Confusing grouping rows with grouping sheet tabs — those are separate features.
  • Deleting rows when you only meant to collapse them.
  • Expecting Subtotal to undo cleanly — remove subtotals from the Data menu, not by deleting rows.

Frequently asked questions

Where is the Group button?

On the Data tab, in the Outline group.

What is the shortcut to group rows?

Alt+Shift+→ to group, Alt+Shift+← to ungroup, on Windows.

Does collapsing a group delete the rows?

No. It only hides them; click + to show them again.

How do I group in Google Sheets?

Right-click the row or column header and choose Group.

Other ways people ask this

People reach this page typing “excel collapse rows”, “row collapse in excel”, “how do i collapse rows in excel” and “collapse row in excel”, among other phrasings; whichever wording you used, the fix above is the one you want.

Why do people search for this in so many different ways?

Because the same task has many names. “excel collapse rows”, “row collapse in excel”, “how do i collapse rows in excel” all point at the one operation explained on this page, which is why they all lead here.