Smart Systems for Home

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

Excel Pivot Table Cannot Group That Selection: Fix

· 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

Excel shows “Cannot group that selection” when the values you selected in a pivot table cannot be grouped by Excel’s rules. The fix is usually one of three things: remove blank cells or text from the field you are grouping, refresh the pivot table so it picks up the current data, or make sure you selected only one field’s items (not the whole table or multiple fields). Work through the checks below in order — most people solve it at step 3 or 4.

What You'll Need

  • Excel for Windows or Mac (the pivot table grouping feature is the same; menu labels can differ slightly by version and region).
  • The source data behind the pivot table, or access to it.
  • A pivot table that is already built and showing the field you want to group.

Step-by-Step

  1. Select only the items you want to group. Click the first item in the pivot table row or column labels, then hold Shift and click the last item. Do not select the entire pivot table, the field header, or a mix of row and column labels — Excel groups one field at a time. If you want to group dates by month, select the date items in the row labels area only.
  2. Check the field for blanks. Go back to the source data and filter the column you are grouping. If there are empty cells, Excel cannot group that selection. Type a value in each blank cell (for dates, use a real date; for numbers, use a number), then refresh the pivot table: right-click the pivot table and choose Refresh. If the pivot table is on a different sheet, use PivotTable Analyze > Refresh (or Data > Refresh All).
  3. Check for text in a number or date field. A single text entry such as “N/A”, a space, or an apostrophe before a number turns the whole column into text, and text cannot be grouped numerically or by date. In the source data, look for cells aligned to the left in a column of numbers (numbers align right by default). Fix each one — remove the apostrophe, convert the text to a number with Text to Columns or VALUE, or delete the row if it is not needed — then refresh.
  4. Remove error values and hidden rows that break the range. If the source range contains #N/A or other errors in the grouping field, grouping fails. Filter them out in the source, correct them, or exclude those rows from the pivot table’s source range. Also check that the source range does not include a totals row at the bottom — a totals row inside the data makes Excel treat the column as mixed data.
  5. Make sure the field is in the correct area. Grouping works on Row Labels or Column Labels, not on Values. If the field appears only in the Values area, drag it to Rows first, then select its items and group. For date fields, Excel usually adds a Months/Years hierarchy automatically when you drag a date into Rows — if you do not see it, right-click a date item and choose Group, then pick Months and Years in the Grouping dialog.
  6. Refresh and retry the group. After fixing the data, right-click the pivot table and choose Refresh, then select the items again and use PivotTable Analyze > Group Selection (or right-click > Group). If the Group option is greyed out, the selection is not valid — go back to step 1 and select a contiguous block of items in one field.
  7. If the pivot table is based on a data model or an external connection, check the source. Pivot tables built from Power Pivot or an external database can behave differently. In that case, clean the data in the source query or table, refresh the connection, and group again. If the field is a calculated column, group the underlying column instead.

Common Mistakes

  • Selecting the whole pivot table or multiple fields before clicking Group — Excel needs a single field’s items.
  • Leaving blank cells in the grouping column. A blank is not zero; it stops grouping entirely.
  • Storing dates as text (for example “01/2024” typed as text). Excel cannot group text as dates.
  • Forgetting to refresh after cleaning the data. The pivot table keeps the old cache until you refresh.
  • Including a totals row or a title row inside the source range, which mixes data types.
  • Trying to group a field that sits in the Values area rather than Rows or Columns.

Tips

  • Convert the source range to an Excel Table (select the data, press Ctrl+T). Tables expand automatically, so new rows are included on refresh and blank rows are less likely.
  • Use a helper column in the source to clean dates or numbers (for example =VALUE(A2) or =DATEVALUE(A2)) and group that column instead of editing the original.
  • For date grouping, right-click any date in the pivot table and choose Group to set the interval (Months, Quarters, Years) in one dialog instead of selecting items manually.
  • If you group numbers, Excel asks for a starting value, an ending value, and a group size — set the size to 10 for decades, 100 for hundreds, and so on.
  • Keep one pivot table per clean source range; mixing sources makes refresh and grouping unpredictable.

Troubleshooting

If the Group option is still greyed out after cleaning, check whether the pivot table has a filter applied that hides items — clear all filters on the pivot table (PivotTable Analyze > Clear > Clear Filters) and try again. If the source data is on another workbook that is closed, open it or use Data > Edit Links to point the pivot table at an open file. If the field contains merged cells, unmerge them in the source and fill each cell, then refresh. If the pivot table was created from a range that no longer matches the data (rows added or deleted), change the source: PivotTable Analyze > Change Data Source, select the full range or table, and refresh. If the error appears only for one field, compare that column with a working one — the difference is usually blanks, text, or errors. If nothing works, rebuild the pivot table from a clean table; that takes a minute and removes cache problems.

Frequently Asked Questions

Why does Excel say it cannot group that selection?

Because the selected items cannot be grouped as they are: usually blanks, text in a number or date field, error values, or a selection that spans more than one field. Clean the data and refresh.

Can I group dates that are stored as text?

No. Convert them to real dates first (Text to Columns or DATEVALUE), refresh the pivot table, then group by Months or Years.

Why is the Group button greyed out?

The selection is not a contiguous block of items from a single row or column field, or the field is in the Values area. Select the items in Row Labels or Column Labels only.

Do I need to refresh after fixing the source data?

Yes. The pivot table uses a cached copy of the data, so right-click the pivot table and choose Refresh before grouping again.

Can I group numbers into ranges?

Yes. Select the number items, right-click and choose Group, then set the starting value, ending value, and group size (for example 10 or 100).

Does grouping work in Excel for Mac?

Yes, the same steps apply. Menu names can differ slightly by version, but Group and Refresh are in the right-click menu and the PivotTable Analyze tab.