Grouping in Excel lets you collapse and expand rows or columns so you can focus on summary data and hide the detail underneath. You can group manually by selecting rows or columns and using the Group command, or let Excel create groups automatically with an outline. Before you start, make sure your data has a clear header row and no blank rows or columns inside the range you want to group, because blanks break the outline. The steps below are for Excel on Windows and Mac desktop; the web version has limited grouping support, and mobile apps cannot create groups.

What You'll Need

  • Excel for Microsoft 365, Excel 2019, 2021, or Excel for Mac (desktop version recommended).
  • A worksheet with data arranged in rows or columns, ideally with headers.
  • No blank rows or columns within the range you plan to group.

Step-by-Step

  1. Select the rows or columns to group. Click and drag across the row numbers or column letters you want to collapse. For example, to group rows 3 through 10, drag from row 3 to row 10. Do not include the header row or the summary row you want to keep visible.
  2. Open the Data tab. On the ribbon, click the Data tab. The Outline group is on the far right. Menu labels can differ slightly by Excel version, device, or region.
  3. Click Group. In the Outline group, click Group. If you selected entire rows, Excel groups them as rows. If you selected entire columns, it groups them as columns. A dialog may appear asking whether to group rows or columns; choose the correct option.
  4. Check the outline symbols. A minus sign (−) appears to the left of the grouped rows (or above grouped columns). Click the minus to collapse the group; click the plus (+) to expand it. The outline level buttons (1, 2, 3…) appear at the top-left of the sheet.
  5. Group additional levels if needed. You can create nested groups. For example, group rows 3–5, then rows 6–10, and then group rows 3–10 as a higher level. Excel allows up to eight outline levels.
  6. Use Auto Outline for automatic grouping. If your data contains formulas that reference detail rows (such as SUM formulas below the detail), select a cell inside the range, go to Data > Group > Auto Outline. Excel creates groups based on formula relationships. Review the result, as automatic grouping can include rows you did not intend.
  7. Hide or show outline symbols. If you do not see the + and − buttons, go to File > Options > Advanced, scroll to Display options for this worksheet, and tick Show outline symbols if an outline is applied. On Mac, use Excel > Preferences > View.
  8. Remove a group. Select the grouped rows or columns, then click Ungroup in the Data tab. To remove all groups at once, click Ungroup > Clear Outline.

Common Mistakes

  • Including the header row in the group. If you group the header, it disappears when you collapse the group, making the sheet confusing. Always leave headers and summary rows outside the grouped range.
  • Leaving blank rows inside the range. Blank rows break the outline and prevent Auto Outline from working correctly. Delete or fill blank rows before grouping.
  • Grouping entire columns by mistake. Selecting column letters groups columns, not rows. If you want to collapse rows, select row numbers.
  • Forgetting that hidden rows stay hidden when you copy. Copying a collapsed group copies only visible cells by default in some versions; check paste results carefully.
  • Using grouping on filtered data. Grouping and filtering can interact unpredictably. Clear filters before creating or removing groups.

Tips

  • Use the outline level buttons (1, 2, 3) at the top-left to collapse or expand all groups at the same level at once.
  • Group columns instead of rows when you want to hide detail columns such as monthly breakdowns while keeping totals visible.
  • Combine grouping with subtotals: create subtotals first, then use Auto Outline to group the detail rows automatically.
  • Keyboard shortcut: select rows, then press Alt + Shift + Right Arrow to group (Windows). On Mac, use Command + Shift + K if assigned, or use the menu.
  • If you share the workbook, note that grouping does not protect data; anyone can ungroup and view hidden rows.

Troubleshooting

  • Group button is greyed out. This happens when the sheet is protected or when you are in a cell edit mode. Press Esc, then check Review > Unprotect Sheet if protection is on.
  • No outline symbols appear. Enable Show outline symbols in Options as described in step 7. Also check that the group was actually applied; the Group button should be available.
  • Auto Outline does nothing. Auto Outline requires formulas that reference the detail rows. If your data is plain values, create groups manually.
  • Groups collapse the wrong rows. You may have grouped columns instead of rows, or included the wrong range. Ungroup and reselect carefully.
  • File is slow with many groups. Very large numbers of groups can slow recalculation. Clear outlines you no longer need with Ungroup > Clear Outline.
  • Grouping missing in Excel for the web or mobile. The web version supports viewing existing groups but cannot create new ones in all plans; mobile apps do not support creating groups. Use the desktop app to create groups, then open the file elsewhere to view them.

Frequently Asked Questions

Can I group non-adjacent rows in Excel?

No. Excel grouping works on contiguous rows or columns. To group non-adjacent rows, group each block separately, or rearrange your data so related rows are together.

Does grouping hide data permanently?

No. Grouping only collapses the view. The data remains in the workbook and can be expanded by clicking the plus sign or using the outline buttons. Anyone with access can ungroup it.

How many outline levels can I create?

Excel supports up to eight levels of outlining. If you need more, consider restructuring your data or using subtotals instead.

Can I group columns as well as rows?

Yes. Select entire columns by clicking column letters, then use Data > Group. The outline symbols appear above the columns.

Why does my Group button not work?

Common causes are sheet protection, editing a cell, or selecting a single cell instead of entire rows or columns. Press Esc, unprotect the sheet if needed, and select full rows or columns before grouping.

Is grouping available in Excel for Mac?

Yes, Excel for Mac desktop supports grouping through the Data tab. The menu location and shortcut keys may differ slightly from Windows.