Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel Cannot Group That Selection: Fixes and Solutions

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The "Excel cannot group that selection" error occurs because you are trying to group rows or columns that are not contiguous or are part of a protected sheet, a shared workbook with restrictions, or an Excel Table (List object). To fix this, ensure you have selected a solid, unbroken block of rows or columns and that the worksheet is not protected. If you are using an Excel Table, you must convert it back to a normal range first, as grouping is not supported within the structured table object.

What You'll Need

  • A computer with Microsoft Excel installed.
  • A worksheet containing the data you wish to organize.
  • Administrative access to the workbook if the sheet is password-protected.

Step-by-Step

Depending on the cause of the error, follow these specific methods to resolve the issue. Note that menu labels may differ slightly based on your version of Excel or region.

Method 1: Ensuring Contiguous Selection

  1. Click on the row header (the number on the left) or column header (the letter at the top) of the first item you want to group.
  2. Hold down the Shift key on your keyboard.
  3. Click on the row or column header of the last item in the group. This ensures every row or column in between is selected, creating a single, unbroken block.
  4. Navigate to the Data tab on the top ribbon.
  5. In the Outline group, click the Group button.

Method 2: Converting an Excel Table to a Range

Excel Tables (created via Insert > Table or Ctrl+T) have structured references that prevent the standard grouping feature from working inside the table boundaries.

  1. Click any cell inside the table that you wish to group. This will activate the table-specific menu tabs.
  2. Go to the Table Design tab (this tab only appears when a cell inside a table is selected).
  3. In the Tools group, click Convert to Range.
  4. When the dialog box asks if you want to convert the table to a normal range, click Yes.
  5. Now, select the rows or columns using the Shift method described in Method 1.
  6. Go to the Data tab > Outline > Group.

Method 3: Unprotecting the Worksheet

Grouping modifies the structure of the worksheet, which is disabled when a sheet is protected.

  1. Go to the Review tab on the ribbon.
  2. Look for the Protect group. If you see a button labeled Unprotect Sheet, it means the sheet is currently locked.
  3. Click Unprotect Sheet. If a password was set, enter it in the prompt.
  4. Select the contiguous rows or columns you want to group.
  5. Go to the Data tab > Outline > Group.
  6. Once grouping is complete, you can return to the Review tab and click Protect Sheet to lock the rest of your data.

Method 4: Checking for Merged Cells

Merged cells that span across the boundary of your selection can confuse Excel's grouping logic.

  1. Select the entire area where you intend to apply the group.
  2. Go to the Home tab.
  3. In the Alignment group, click the dropdown arrow next to Merge & Center.
  4. Select Unmerge Cells.
  5. Re-select only the rows or columns you need and apply the grouping via Data > Outline > Group.

Common Mistakes

One of the most frequent mistakes is using the Ctrl key instead of the Shift key when selecting rows. While the Ctrl key allows you to pick specific, non-adjacent rows (e.g., row 5, row 10, and row 15), Excel cannot group these because a group must be a continuous range. If you select row 5 and row 10 using Ctrl, Excel sees a "gap" and triggers the "cannot group that selection" error.

Another common error is attempting to group data that is already inside a "Filtered" view. If you have active filters on your data, some rows are hidden. While you can sometimes group filtered data, it often leads to selection errors or unexpected results because you are selecting visible cells rather than a contiguous range of row indices. Always clear your filters before setting up your grouping structure.

Users also frequently forget that grouping is a structural change. If you are working in a shared workbook (legacy shared mode) or a co-authored file with specific range protections, the Grouping button may be greyed out or trigger this error because the workbook's current state prohibits structural modifications to prevent other users' views from breaking.

Tips

To make your grouped data more intuitive, you can change the direction of the expand/collapse buttons. By default, Excel puts the "+" or "-" buttons below the group or to the right. To change this, go to the Data tab, click the small diagonal arrow (the Settings launcher) in the bottom-right corner of the Outline group. In the settings window, uncheck "Summary rows below detail" to move the buttons to the top of the group.

For those managing very large datasets, using Auto Outline can save time. If your data has formulas (like SUM) at the bottom of sections, Excel can often detect these and create groups automatically. Go to Data > Group (dropdown arrow) > Auto Outline. This avoids the manual selection process entirely and eliminates the risk of the "cannot group that selection" error.

If you find yourself grouping and ungrouping frequently, learn the keyboard shortcuts. To group the current selection, press Shift + Alt + Right Arrow. To ungroup, press Shift + Alt + Left Arrow. These shortcuts are faster and less prone to the menu-click errors that occur when the window focus shifts.

Troubleshooting

If you have followed the steps above and still encounter the error, try these steps in order of complexity:

1. Check for Hidden Rows/Columns: Sometimes, hidden rows within your selection cause Excel to perceive the range as non-contiguous. Select the entire sheet (Ctrl+A), right-click any row header, and select Unhide. Do the same for columns. Now try grouping again.

2. Verify Workbook Protection: Beyond sheet protection, the entire workbook might be protected. Go to the Review tab and check if Protect Workbook is highlighted. If it is, click it to disable workbook-level protection, which can restrict structural changes like adding or grouping rows.

3. Test in a New Sheet: Copy the raw data (without formatting) and paste it into a brand-new worksheet. If grouping works there, the original sheet likely has corrupted metadata, invisible objects, or complex conditional formatting that is interfering with the selection. Use Paste Special > Values to ensure no hidden table formatting is carried over.

4. Check for Array Formulas: If your selection includes cells that are part of a legacy CSE (Ctrl+Shift+Enter) array formula, Excel may prevent grouping because the array must remain an intact block. Identify the array formulas and move them outside the grouping range.

Frequently Asked Questions

Can I group rows and columns at the same time?

Yes, you can have both row groups and column groups in the same worksheet. However, you cannot select a mix of rows and columns in a single selection to group them together; you must group the rows first, then separately select and group the columns.

Why is the Group button greyed out?

The Group button is usually greyed out if the worksheet is protected, if you are currently editing a cell (the cursor is blinking inside a cell), or if the workbook is shared in a way that restricts structural changes.

Does grouping delete any of my data?

No, grouping does not delete or move any data. It simply adds a toggle interface to the margin of the spreadsheet that allows you to hide and show specific ranges of data quickly.

How do I remove all groups at once?

Select the entire worksheet, go to the Data tab, click the arrow under Ungroup, and select Clear Outline. This will remove all grouping levels from the entire sheet.

Can I group data in Excel Online?

Yes, grouping is supported in Excel for the Web, but the interface may differ slightly. You can find the grouping options under the Data tab, though some advanced outline settings available in the desktop version may be missing.