Excel Cannot Group: Fix Grouping Errors Fast
In this article
Excel refuses to group rows or columns for a few predictable reasons: blank cells or text inside the range you selected, subtotals mixed into the data, a protected sheet, or a pivot table field that contains blanks. The fix is almost always to clean the source range, remove any existing outline or subtotal structure, and then apply Data > Group to a contiguous block of cells. If you are grouping a pivot table field instead, make sure the field has no blank or text entries and that you are grouping a date or number field, not a text field.
What You'll Need
- Excel for Windows, Mac, or Excel for the web (the Data tab and Group command are present in all current versions; labels can differ slightly by version, device, or region).
- A worksheet where the rows or columns you want to group form one continuous block with no completely blank rows or columns inside it.
- Edit permission on the workbook. If the sheet is protected, grouping is disabled until protection is removed.
- For pivot table grouping: a PivotTable with a date, number, or text field in the Rows or Columns area.
Step-by-Step
- Select the exact range you want to group. Click the first row or column header you want inside the group, hold Shift, and click the last one. Do not select the entire sheet. Grouping works on a contiguous selection, so a selection that skips rows will fail or produce unexpected outlines.
- Check for blank rows, blank columns, or text inside the range. A single completely blank row in the middle of your selection breaks the block. Delete or fill those rows, or select only the solid block you actually want to group. Text values are fine for row grouping but not for pivot table grouping of numbers or dates.
- Remove any existing subtotals or outline groups first. Go to Data > Subtotal and click Remove All if subtotals are present. Then use Data > Ungroup > Clear Outline to strip old grouping levels. Applying Group on top of a broken outline is a common cause of the error.
- Unprotect the sheet if it is protected. Go to Review > Unprotect Sheet. If you do not know the password, ask the workbook owner; there is no legitimate way around it. Grouping is blocked while protection is on.
- Apply the group. With the range selected, go to Data > Group. For rows, choose Rows; for columns, choose Columns. A minus button and outline bar appear at the left or top of the sheet.
- For pivot tables, group the field, not the cells. Right-click a value in the row or column field and choose Group. For dates, Excel usually offers Months, Quarters, and Years. For numbers, set a starting value, an ending value, and a group size. If the option is greyed out, the field contains blanks or text, so clean the source data and refresh the PivotTable first.
- Test the outline. Click the minus button to collapse and the plus button to expand. If the buttons do nothing, the sheet is still protected or the outline is corrupt, so clear the outline and repeat from step 1.
Common Mistakes
- Selecting the entire worksheet instead of the specific rows or columns. Excel then tries to group everything and often returns an error.
- Leaving a blank row inside the selection. The block is no longer contiguous, so grouping fails or groups the wrong rows.
- Grouping cells in a PivotTable instead of grouping the field. Right-click the field value and use Group there.
- Forgetting that the sheet is protected. The Group button appears active but does nothing.
- Stacking new groups on top of old subtotals. Always clear the outline first.
- Trying to group a text field in a PivotTable as if it were a date or number. Text fields cannot be numerically grouped; use a helper column or clean the data.
Tips
- Use Data > Outline settings to move the outline buttons to the top or left if they are hard to see.
- Name your ranges with Formulas > Define Name so you can reselect the same block quickly after clearing an outline.
- Keep one header row above the data and no blank rows below it; this makes grouping and sorting predictable.
- For pivot dates, add a proper Date column in the source table and format it as a date before refreshing. Text that looks like a date will not group.
- Save a copy before clearing outlines or removing subtotals, since those actions cannot be undone after you close the workbook.
Troubleshooting
If the Group command is greyed out, the sheet is protected or the selection is not a contiguous range. Unprotect the sheet and reselect a solid block. If you get a message that Excel cannot group the selection, clear any existing outline with Data > Ungroup > Clear Outline, delete blank rows inside the range, and try again. If grouping works but the outline buttons do not respond, check File > Options > Advanced and make sure outline symbols are set to show; on Mac, look under Excel > Preferences. If a PivotTable field will not group, refresh the PivotTable after cleaning blanks and confirm the field is formatted as Date or Number, not Text. If the workbook is shared or co-authored, ask other editors to close it, then reopen and retry, because conflicting edits can leave the outline in a broken state.
Frequently Asked Questions
Why is the Group button greyed out in Excel?
Usually because the worksheet is protected or because the selected cells are not one continuous block. Unprotect the sheet under Review and reselect a solid range.
Can I group rows that contain blank cells?
Yes, blank cells inside rows are fine. A completely blank row between selected rows is what breaks grouping, so remove or fill it first.
Why can't I group dates in a PivotTable?
The date field probably contains blank cells or text values. Clean the source column, format it as Date, and refresh the PivotTable before grouping.
Does grouping hide or delete my data?
It only hides rows or columns behind an outline button. The data stays in place and reappears when you expand the group.
How do I remove all groups at once?
Go to Data > Ungroup > Clear Outline. This removes every outline level on the sheet but does not delete any cells.
Can I group in Excel for the web?
Basic row and column grouping is available on the Data tab in Excel for the web, but some outline and PivotTable grouping options are limited compared with the desktop app.