How to Collapse and Expand Rows or Columns with Excel's Group and Outline

Tap through each step to group and outline your data.

  1. Select the rows or columns to collapse

    Drag to select the rows or columns you want to collapse and expand together.

  2. Click "Group" on the Data tab

    On the ribbon's "Data" tab, click "Group" in the Outline section.

  3. Use the "-"/"+" icons to collapse and expand

    Once grouped, "-" and "+" buttons appear next to the row/column numbers, letting you hide or reveal that section with one click.

  4. Nest groups for multiple levels

    Creating another group inside an already-grouped range builds a multi-level outline structure.

  5. Why it's useful

    When you want to show monthly detail rolled up into quarterly totals, you can keep the detail rows intact and simply expand them only when needed, keeping the sheet far tidier.

Show summary and detail together

Rather than deleting detail rows to make a sheet look cleaner, grouping lets you collapse them out of view while keeping the underlying data intact, and expand them again the moment you need to check something.

Excel can build the groups for you

Clicking the small arrow next to the "Group" button and choosing "Auto Outline" analyzes the formula structure in your sheet β€” such as which rows feed into a subtotal row β€” and creates the groups automatically, saving you from selecting each range by hand.

Frequently Asked Questions

Can Excel create groups automatically?

Yes β€” click the dropdown arrow next to the "Group" button and choose "Auto Outline," and Excel analyzes the formulas in your sheet to build the groups for you.

How do I remove a group?

Select the same rows or columns and click "Ungroup," or use "Clear Outline" to remove every group in the sheet at once.