In Excel for Microsoft 365 on Windows, select the rows or columns you want to group and press Alt+Shift+Right Arrow. To remove a group, select it and press Alt+Shift+Left Arrow; the commands create or remove an outline, letting you collapse detail without deleting it.
Shortcut at a glance
- Group selected rows or columns: Alt+Shift+Right Arrow.
- Ungroup selected rows or columns: Alt+Shift+Left Arrow.
- Show or hide outline symbols: Ctrl+8 in Excel for Windows. This toggles the outline controls; it does not group or ungroup anything.
The arrow direction is a useful way to remember the commands: the right arrow adds a level of grouping, while the left arrow removes one. These shortcuts apply to row and column outlines, not to grouping worksheet tabs or grouping items in a PivotTable. Those are separate Excel features.
What grouping does in Excel
Grouping organizes worksheet rows or columns into an outline. Excel adds controls beside the row numbers or above the column letters. You can use the plus and minus buttons to expand or collapse a group, or use the numbered outline buttons to display a broader level of detail. The underlying cells remain in the worksheet when you collapse a group; their contents are not erased.
This is useful when a sheet contains supporting detail that is helpful sometimes but distracting in a summary view. For example, a monthly report might keep daily transactions in rows 5 through 34 and a monthly total in row 35. Grouping the transaction rows lets a reader collapse them and leave the total visible. Grouping is different from hiding rows: an outline makes the relationship between detail and summary explicit and gives readers controls for changing the view.
Grouping also does not calculate a total for you. Add a formula or another summary value separately, then group the detail around it. A collapsed outline is a display choice, not a substitute for checking which rows a calculation includes.
How to group rows with the shortcut
- Make sure the worksheet is not in cell-edit mode. If a cursor is active inside a cell, press Enter or Esc first.
- Select the row numbers for the detail you want to place in a group. For a continuous block, click the first row number and drag to the last, or click the first and Shift-click the last.
- Press Alt+Shift+Right Arrow.
- Check the outline controls beside the row numbers. Use the minus button to collapse the selected detail and the plus button to show it again.
Suppose rows 6 through 10 contain individual product lines and row 11 contains their subtotal. Select rows 6 to 10—not the subtotal row—then use the shortcut. The subtotal can remain visible when the detail is collapsed. This arrangement is easiest to read when the summary row sits outside the detail group.
If you select cells instead of whole row headers, Excel may show a Group dialog so you can specify whether to group rows or columns. Selecting the row or column headers makes your intention clearer and is a good habit when using the shortcut.
How to group columns
Column grouping uses the same keyboard shortcut. Select the column letters for the detail columns, then press Alt+Shift+Right Arrow. Excel adds outline controls above the column headings. Click the minus button to collapse those columns or the plus button to restore them.
For instance, a budget worksheet could show a yearly total in column B and monthly figures in columns C through N. If you group columns C through N, readers can temporarily collapse the monthly detail while keeping the yearly figure visible. Select the columns that are detail, not the summary column you want to retain.
Rows and columns can have separate outlines on the same worksheet. Before grouping, check the selected headers and the existing outline symbols so you do not accidentally add a group in the wrong direction or at an unintended level.
Nested groups and outline levels
You can create groups inside larger groups to reveal detail in stages. For example, a regional report might group transaction rows by month and then group the months by quarter. First group the rows for each month; then select the larger blocks and group them at the quarter level. Use the outline level buttons, usually numbered 1, 2, and 3, to display progressively more detail. Excel supports up to eight outline levels for rows and eight for columns.
Plan the ranges before building a nested outline. Keep each summary line outside the detail rows it summarizes if you want it to remain visible when that detail is collapsed. If the minus buttons collapse more or less than expected, expand the outline and inspect which row or column headers are included in each group. It is often quicker to ungroup the incorrect range and rebuild it than to keep adding groups over a mistaken selection.
Outline symbols can be hidden even when groups still exist. In Windows, Ctrl+8 toggles those symbols on or off. If the rows appear to have vanished, look at the row numbers for gaps and use the relevant outline level or plus button; the data may simply be collapsed.
Ungrouping, expanding, and hiding are different
To remove an outline group, select the rows or columns in that group and press Alt+Shift+Left Arrow. You can also use the ribbon path Data > Outline > Ungroup. If several nested levels exist, you may need to remove the relevant level rather than expecting one command to clear every outline on the sheet.
Clicking a plus button expands a group but keeps the group structure. Clicking a minus button collapses it but also keeps the structure. Ungrouping removes that structure. Hiding rows or columns is another separate action: it conceals selected headings without creating an outline that users can expand with the group controls. Choose based on whether other people need a clear, reusable way to reveal the detail.
Ribbon method and platform differences
If you do not want to use a keyboard shortcut, select the rows or columns and choose Data > Outline > Group. To remove a group, choose Data > Outline > Ungroup. Depending on the ribbon layout and window width, the Outline commands may be compact or harder to spot, but the Data tab is the place to look.
In Excel for Mac, the corresponding shortcuts are generally Option+Shift+Right Arrow to group and Option+Shift+Left Arrow to ungroup. On some Mac keyboards or configurations, the arrow-key combination may be intercepted or behave differently; use the Data tab commands if the shortcut does not work. Excel for the web can also vary with browser and keyboard settings, so the ribbon command is a practical alternative when a desktop shortcut is unavailable.
Common shortcut problems
- The shortcut types or changes something in a cell. Exit cell-edit mode first, then select the row or column headers and try again.
- No outline buttons appear. Confirm that the selection is a valid row or column range and that the sheet is not protected in a way that prevents outlining. In Windows, Ctrl+8 may have hidden the symbols.
- The wrong direction is grouped. Select row numbers for a row outline or column letters for a column outline. A selection of ordinary cells may require you to choose Rows or Columns in a dialog.
- The shortcut does nothing in a browser or remote session. Another application, browser, or keyboard setting may capture the key combination. Try Data > Outline > Group in Excel, or use the desktop app if the browser does not offer the needed command.
- A PivotTable does not respond as expected. PivotTable expansion, collapsing, and grouping of dates or values use PivotTable-specific controls. The row and column outline shortcut is intended for worksheet ranges.
Worksheet groups are not row groups
Excel also uses the word “group” for selecting multiple worksheet tabs. That is different from creating an outline. In Windows, Ctrl+Shift+Page Up or Ctrl+Shift+Page Down selects the current sheet together with an adjacent sheet; Ctrl-clicking sheet tabs can select multiple sheets. Be cautious when worksheets are grouped: edits made to one selected sheet can also be applied to the others. To stop grouping sheets, select a single sheet tab.
Those worksheet-tab shortcuts do not collapse rows or columns. For an outline on the active worksheet, use Alt+Shift+Right Arrow after selecting the row or column headers. For a PivotTable, use its own expand, collapse, or grouping commands instead.
Frequently Asked Questions
What is the Excel group shortcut key?
On Windows, select the rows or columns and press Alt+Shift+Right Arrow. On Mac, use Option+Shift+Right Arrow where supported.
What is the shortcut to ungroup in Excel?
Select the grouped rows or columns and press Alt+Shift+Left Arrow in Windows. On Mac, the corresponding shortcut is Option+Shift+Left Arrow.
Can I group rows without hiding them?
Yes. Grouping adds outline controls but does not automatically remove the rows from view. Click the minus button to collapse the detail, or leave the group expanded.
Why can’t I see the plus and minus buttons?
The outline symbols may be toggled off with Ctrl+8 in Windows, or the rows or columns may not be grouped. Check the Data tab and the row or column headers; also consider whether worksheet protection is blocking the command.
Does grouping delete data or affect formulas?
No. Grouping changes the outline and display of rows or columns, not their cell contents. A formula may still include collapsed rows, so verify the formula range rather than assuming collapsed detail is excluded.
Related
- Excel Consolidate Rows With the Same Value
- Excel Consolidate Lists With Duplicates: Keep or Remove?
- Excel Consolidate List of Names: 10 Practical Methods
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Double Space in WordTo double-space text in Microsoft Word, select the text, then choose Home > Line and Paragraph Spacing >…
- Data Cleaning in Excel: Practical Techniques That WorkClean data in Excel by first making a copy of the source, inspecting the columns, and then using…
- How to Delete a Horizontal Page in WordTo delete a horizontal page in Word, remove the content on that page, then check its page and…
- Excel Find and Replace Carriage Returns: Steps and FixesIn Excel for Microsoft 365 on Windows, press Ctrl+H, click the Find what box, and press Ctrl+J to…
- Google Sheets IF Statement With Dropdown: ExamplesYes. In Google Sheets, an IF formula can read the value selected in a dropdown and return a…
- Create an Envelope Template in Word: A Practical GuideIn Microsoft Word for Microsoft 365 on Windows, go to Mailings > Envelopes, enter the delivery and return…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.