Sub topic 10
Fixing "Cannot group that selection"
This chapter assumes you can build a PivotTable, place fields in Rows, Columns, and Values, and enter basic formulas. It also assumes your source data sits in a table or a contiguous range with one header row. You should already know that Excel groups dates and numbers because it stores them as numbers.
What the error means
When you right-click a date or number field and choose Group, Excel may show the message "Cannot group that selection." Excel does not group by guessing. It needs every item in the field to be a real date or number. If even one item is text, an error value, or a blank cell, the grouping fails for the whole field.
The error appears in a few typical situations:
- The field holds dates stored as text, such as
2026-01-15pasted from another system. - The field contains blank cells in the source data.
- The field mixes numbers and text, such as
12andn/a. - You selected items that cannot form a group, such as a single item in a field Excel cannot treat as numeric.
Step 1: Test the source column
The fastest check is to test each cell in the source data. Add a temporary column next to your dates and enter this formula for the first row, then fill it down:
=ISNUMBER(A2)It returns TRUE when the cell holds a real date or number and FALSE when it holds text. Filter the temporary column for FALSE. Those rows are the ones that block grouping.
A second sign is alignment. Real dates align right by default, while text dates align left. Alignment can be changed by formatting, so rely on ISNUMBER first.
Step 2: Fix the cause
Choose the fix that matches what you found.
| Cause | Fix |
|---|---|
| Dates stored as text | Select the column, use **Data > Text to Columns**, choose **Delimited**, then **Finish**. In step 3 of the wizard, set the column format to **Date**. |
| Numbers stored as text | Use **Text to Columns** the same way, or multiply the values by 1 in a helper column. |
| Blank cells | Enter a valid value, or filter out and delete the blank rows. For dates, a blank cannot be grouped. |
| Error values such as `#N/A` | Correct the formulas that produce them, or wrap them with `IFERROR` in a helper column. |
If the dates come from a formula, check that the formula returns a date and not a text string built with TEXT.
Step 3: Refresh and group again
Fixing the source data does not change the PivotTable until you refresh it. Right-click the PivotTable and choose Refresh, or press Alt+F5. Then select a date in the field, right-click, and choose Group again.
If the PivotTable still reports the error, the field may be pulling from an old range. Open PivotTable Analyze > Change Data Source and confirm the range covers the corrected rows.
Step 4: Use a helper column when you cannot fix the source
Sometimes you cannot clean the data, or the source is a connection you do not control. A helper column in a source table you do own can produce grouping values that are always valid. The following formula returns the Monday of the week containing the date in A2:
=A2-WEEKDAY(A2,2)+1Because the result is a real date, you can place the helper column in the PivotTable and group by week without the dialog.
Quick recap of the checks
- Run
=ISNUMBER(A2)down the column and filter for FALSE. - Convert text to real dates or numbers.
- Remove or fill blank cells and fix error values.
- Refresh the PivotTable, then confirm the data source range.
- Group again, or fall back to a helper column.
Exercise
A date field in your PivotTable will not group. =ISNUMBER(A2) returns TRUE for every row, yet Excel still shows "Cannot group that selection." Name two other things in the source data to check, and the step you must do after fixing them.
Show answer
Check for blank cells in the date column and for error values such as #N/A. A blank or error cell blocks grouping even when the other cells are real dates. Also confirm the PivotTable's data source range includes the corrected rows. After fixing the data, refresh the PivotTable (right-click and choose Refresh, or press Alt+F5) before trying Group again.
Exercise
Your colleague pastes dates such as 2026-03-14 that Excel left-aligns in the cell. What does the alignment suggest, and how can you convert the column to real dates using a built-in tool?
Show answer
Left alignment suggests the values are text. Select the column, choose Data > Text to Columns, pick Delimited, click Next until step 3, set the column data format to Date, and click Finish. Then confirm with =ISNUMBER(A2) and refresh the PivotTable.