How to Group in Excel: Rows, Columns, and Data Ranges Explained
Grouping in Excel is one of those features that quietly transforms how you work with large spreadsheets. Whether you're collapsing rows to focus on summary data, organizing columns by category, or structuring a multi-level outline, Excel's grouping tools give you control over what's visible without deleting anything. Here's how it works — and what determines whether it fits your workflow.
What "Grouping" Actually Means in Excel
Excel uses the term grouping in a few distinct contexts:
- Row and column grouping — collapses or expands sections of your spreadsheet using the Outline feature
- Grouping in PivotTables — bundles data values (like dates or numbers) into ranges or periods
- Grouping shapes or objects — treats multiple drawn elements as a single unit
These are genuinely different tools. Most people searching "how do I group in Excel" are asking about rows and columns, but the answer shifts significantly if you're working in a PivotTable.
How to Group Rows or Columns 📋
This is the most common use case. Grouping lets you collapse a set of rows or columns into a single toggle, which is useful when you have subtotals, sections, or repeating data blocks you don't need to see constantly.
To group rows:
- Select the rows you want to group by clicking their row numbers (hold Shift to select a range)
- Go to the Data tab on the ribbon
- Click Group in the Outline section
- A bracket and toggle button (a small minus sign) will appear on the left margin
- Click the – to collapse, + to expand
To group columns, the process is identical — select column letters instead of row numbers, then follow the same steps.
Keyboard shortcut: With rows or columns selected, press Alt + Shift + Right Arrow to group and Alt + Shift + Left Arrow to ungroup on Windows.
Using Auto Outline vs. Manual Grouping
Excel can also automatically detect grouping structure based on your formulas. If you've built a spreadsheet with consistent subtotals using SUM or SUBTOTAL functions, Excel's Auto Outline feature (Data → Group → Auto Outline) will create grouped sections based on where it detects those formula relationships.
Manual grouping is more flexible but requires you to define every group yourself. Auto Outline is faster but only works reliably when your data follows a strict formula pattern — it produces unexpected results on irregular layouts.
| Method | Best For | Limitation |
|---|---|---|
| Manual Grouping | Any layout, full control | Takes more setup time |
| Auto Outline | Structured data with consistent subtotals | Requires predictable formula patterns |
Multi-Level Grouping (Nested Groups)
Excel supports up to eight levels of nested grouping. This means you can have a top-level group for a department, a second-level group for teams within that department, and a third for individual entries — each independently collapsible.
The numbered buttons that appear in the top-left corner of the spreadsheet (labeled 1, 2, 3, etc.) let you jump to a specific outline level globally, which is useful when you need to quickly show only summary rows across an entire large dataset.
Grouping in PivotTables
PivotTable grouping works differently. Here, you're grouping data values rather than physical rows.
Common uses:
- Grouping dates by month, quarter, or year instead of showing every individual date
- Grouping numbers into custom ranges (e.g., 0–100, 101–200)
- Grouping text items manually into named categories
To group in a PivotTable, right-click on a value in the row or column field and select Group. For dates, Excel will offer standard intervals. For numbers, you define the start, end, and interval size. For text, you manually select items and group them together.
One important note: date grouping behavior changed in Excel 2016. Dates are grouped automatically by default in newer versions, which surprises users upgrading from older Excel builds or coming from Excel on Mac, where some grouping behaviors differ.
Ungrouping and Clearing Outlines
To remove a group: select the grouped rows or columns, go to Data → Ungroup, and choose Rows or Columns.
To remove all grouping at once: Data → Ungroup → Clear Outline. This removes the entire outline structure without affecting your data.
What Affects How Grouping Behaves for You 🔍
Several variables shape whether grouping works the way you expect:
- Excel version — Excel 2016 and later handle date grouping in PivotTables automatically; older versions don't. Some advanced outline features behave differently in Excel for Mac vs. Windows.
- Data structure — Grouping works cleanly on contiguous, consistently formatted data. Merged cells, irregular formatting, or gaps in rows can break Auto Outline or create unexpected results.
- Filtered data — Grouping and filtering can interact in non-obvious ways. Collapsing grouped rows while a filter is active may produce confusing display behavior.
- Shared workbooks — In older versions of Excel, certain outline features are restricted in shared workbooks.
- Skill level and workflow — Power users often combine grouping with named ranges, SUBTOTAL functions, and protected sheets to build structured, presentation-ready reports. Casual users typically use manual grouping for basic collapsing.
The Variables That Make the Difference
Someone building a quarterly financial report with nested department data needs multi-level grouping and careful outline design. Someone just trying to hide a block of helper columns temporarily might use a simple one-level group — or might find that hiding columns entirely serves them just as well.
PivotTable date grouping solves a completely different problem than row outline grouping, even though both live under the "group" label in Excel. The right approach depends on what your data looks like, how it's structured, and what you need the reader or user of your spreadsheet to experience when they interact with it.