How to Fix Excel PivotTable Cannot Group This Selection Error
Question details
The user is encountering a 'Cannot group this selection' error in Excel when attempting to group PivotTable data by date, even after formatting dates and removing blank cells.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Grouping PivotTable data by date after a data refresh.
- Observed behavior
- Excel displays a 'Cannot group this selection' error and prevents the user from grouping the selected PivotTable dates.
Confirm that the column you want to group does not contain any hidden rows or merged cells that might interfere with PivotTable grouping.
Include Column Headers and Verify Date Formats
The most common cause for this error is missing column headers or invalid data types (blanks, text, or errors) within the source data range.
Excel PivotTables require a strict dataset structure to group fields like dates. Even a single text string or an omitted column header in your source range will cause the grouping feature to fail.
Navigate to your original source data worksheet and ensure the date column header is explicitly included in the selected data range for the PivotTable.
Scan the entire date column to verify there are no blank cells, text strings, or error values mixed in with the dates.
Select all the date cells, right-click, choose 'Format Cells', and ensure they are formatted explicitly as Dates rather than General or Text.
Go back to your PivotTable, click on 'PivotTable Analyze' (or 'Options' in older versions), and click 'Refresh' to update the cache.
Right-click the date field in the PivotTable and select 'Group' to apply your desired date grouping (e.g., Months, Quarters).

Create and Group PivotTables Seamlessly in WPS Spreadsheet
Avoid frustrating grouping errors by using WPS Spreadsheet. It offers an intuitive PivotTable interface that automatically detects date formats and helps you group your data by months, quarters, or years with just a few clicks.
- 1. Open your dataset: Launch WPS Spreadsheet and open the file containing your raw data.
- 2. Insert a PivotTable: Select your entire data range including headers, go to the 'Insert' tab, and click 'PivotTable'.
- 3. Add the Date field: In the PivotTable Field List, drag your Date field into the Rows area.
- 4. Group the dates: Right-click any date value in the generated PivotTable and select 'Group'.
- 5. Select grouping intervals: Choose your desired grouping interval (e.g., Months, Quarters) from the dialog box and click 'OK'.

Frequently Asked Questions
Why does Excel say 'Cannot group that selection' even when there are no blank cells?
This often happens if some dates are stored as text. Even if a cell visually looks like a date, Excel might not recognize it as a valid date serial number. Use the 'ISNUMBER' function to check if the dates are valid numbers, or use the 'Text to Columns' wizard to convert them.
Does the PivotTable source data range affect grouping?
Yes. If your source data range includes empty rows at the bottom or misses the column header at the top, the PivotTable cannot group the dates. Always select the exact range containing your data and headers, or convert your data into an Excel Table for dynamic range adjustment.
How do I group by months and years simultaneously in a PivotTable?
Once your dates are recognized as valid, right-click the date field in the PivotTable, select 'Group', and in the Grouping dialog box, click to highlight both 'Months' and 'Years'. Click OK to apply multiple grouping levels.
Can invalid data in another column prevent date grouping?
No, the grouping error specifically evaluates the data within the field you are attempting to group. As long as the date column itself contains completely valid dates and a header, it should group successfully regardless of other columns.




