Excel Grouping Shortcut to Collapse Rows Instantly
In this article
Use Excel grouping shortcut to collapse rows instantly and hide details without deleting data.
What You'll Need
- A worksheet containing rows you want to group, such as sales figures, project tasks, or inventory lists.
- Basic familiarity with Excel navigation, including the use of the row numbers on the left and the ribbon.
- No special software, add‑ins, or external tools required; the functionality is built into all recent versions of Excel for Windows and macOS.
- If you are working with filtered data, ensure that the filter mode is turned off or that you understand how grouping interacts with filters.
Step‑by‑Step
- Identify the exact range of rows you wish to group. Click the first row number, then drag to the last row number to select a contiguous block. For example, if you have monthly expenses listed from row 5 through row 30, click 5, hold Shift, and drag to 30.
- Verify that the selected rows contain only the data you intend to hide. If there are merged cells, blank rows, or extraneous headings within the selection, adjust the selection so that only the pure data rows are included.
- On Windows, press Alt + Shift + Right Arrow; on macOS, press Option + Shift + Right Arrow. This command creates an outline group around the selected rows. You will see a small “+” sign appear on the left border of the grouped area.
- To collapse the group immediately, click the minus sign (–) that appears on the left border of the grouped rows. The rows will disappear from view, leaving only the outline indicator.
- If you need to expand the rows again, click the plus sign (+) on the left border or press Alt + Shift + Left Arrow (Windows) or Option + Shift + Left Arrow (macOS). The rows will reappear exactly as they were.
- For larger data sets, you can speed up selection by using Ctrl + Shift + Arrow to extend the selection to the edge of contiguous data, then apply the grouping shortcut.
- If you accidentally group the wrong rows, press Ctrl + Z to undo the grouping operation; the rows will return to their original state.
- When working with multiple worksheets, repeat the steps on each sheet individually; grouping cannot span across worksheets.
- If your worksheet is protected, go to the Review tab, click Unprotect Sheet, and enter the password if required before attempting the grouping shortcut.
- After grouping, you can still sort or filter the visible rows, but remember that hidden rows remain part of the data set and will reappear when the group is expanded.
Common Mistakes
One frequent error is selecting rows that include hidden or filtered cells, which can cause the grouping command to behave unpredictably. Excel may only group the visible cells, leaving the hidden ones outside the group, which can result in an inconsistent outline. Another mistake is attempting to group rows that contain merged cells; merged cells break the outline structure and prevent the minus and plus signs from appearing. Additionally, users sometimes forget to turn off the filter mode before grouping, causing the filter arrows to interfere with the grouping indicators. Always double‑check the selected range, ensure no merged cells are present, and verify that filters are disabled when you intend to create a group.
Tips
To access the grouping menu quickly without memorizing shortcuts, select the rows and right‑click to open the context menu; choose “Group” from the list. You can also add the grouping command to the Quick Access Toolbar for one‑click access: click the dropdown arrow on the toolbar, select “More Commands,” then choose “Group” from the available commands and click “Add.” When you frequently group similar sections—such as weekly reports—consider assigning a named range to the header row; then, when you select that named range and press the shortcut, Excel will automatically group the associated data rows. Using consistent data structures (same number of columns, no blank rows within the group) ensures that the outline behaves predictably and that expanding and collapsing work smoothly across different worksheets.
Advanced Grouping Techniques
Excel allows you to create hierarchical outlines by nesting groups within larger groups. For instance, if you have a list of projects, each project may contain multiple tasks. First, group all tasks belonging to a project, then select the project’s heading row along with its grouped tasks and apply grouping again. This creates a secondary outline level where the project heading can be collapsed to hide all its tasks at once. You can also combine grouping with subtotals: after grouping, go to the Data tab, click Subtotal, and choose the appropriate function (such as Sum or Count) to automatically insert subtotal rows within the group. These subtotal rows will also be included in the outline and can be expanded or collapsed together with the original data.
Interacting with Filters
When you have an active AutoFilter on a table, grouping rows will still create an outline, but the filter arrows may remain visible on the grouped columns. If you want the filter to disappear while the group is collapsed, you can temporarily clear the filter by clicking the Clear Filter button on the Data tab, or you can disable filtering altogether before grouping. Keep in mind that clearing a filter removes any active filter criteria, so be sure that you do not need the filtered view for other analyses. After grouping, you can re‑apply the filter if needed; the grouping structure will remain intact, and the filter will operate on the visible rows only.
Keyboard Shortcut Reference
Below is a concise reference for the most common grouping shortcuts across platforms:
- Windows – Collapse: Alt + Shift + Right Arrow
- Windows – Expand: Alt + Shift + Left Arrow
- macOS – Collapse: Option + Shift + Right Arrow
- macOS – Expand: Option + Shift + Left Arrow
- Both – Quick group via ribbon: Select rows → Home tab → Format → Group → Group
- Both – Undo grouping: Ctrl + Z (or Command + Z on macOS)
These shortcuts work in Excel 2016, 2019, 2021, and Excel for Microsoft 365. If you are using an older version such as Excel 2013, the shortcuts are the same, but the ribbon path may be labeled slightly differently.
Checking Group Integrity
After you have collapsed a group, it is good practice to verify that the rows truly disappear and that no stray rows remain visible. Look at the row numbers on the left; if the numbers skip from, for example, 5 to 35, the group is correctly formed. You can also press Ctrl + End to jump to the last used cell; the cursor should land on the first cell after the grouped area. If you notice that some rows are still visible despite the minus sign being present, it may indicate that the selection included hidden rows or that the worksheet protection prevented the group from being applied. In such cases, unprotect the sheet, re‑select the rows, and repeat the grouping steps.
Using Grouping with Tables
If your data is formatted as an Excel Table (Insert → Table), grouping works slightly differently. Tables automatically expand when new rows are added, but they do not support the traditional outline group feature. However, you can still use the shortcut to collapse rows within a table by first converting the table to a normal range (Table Design → Convert to Range), then applying the grouping steps described earlier. Once grouped, the outline signs will appear, and you can collapse and expand as needed. Remember that converting to a range removes the automatic table features such as structured references, so use this approach only when you need the grouping functionality.
Security and Data Preservation
Grouping does not alter or delete any data; it merely hides rows temporarily. Nevertheless, if you are working with sensitive information, consider protecting the worksheet after grouping to prevent accidental edits. Go to Review → Protect Sheet, set a password if desired, and ensure that the “Select locked cells” option is enabled. This way, the grouped rows remain hidden, and any changes to the visible data require the sheet to be unprotected first. Additionally, always keep a backup copy of the workbook before performing bulk grouping operations, especially when dealing with large data sets that may involve complex nested groups.