If Excel says “Cannot group that selection” when you try to group PivotTable items, first check the source field for blanks, text values, or entries that do not match the field’s data type. Correct the source data, refresh the PivotTable, select an item in the field, then choose PivotTable Analyze > Group Selection in Excel for Microsoft 365 on Windows.
What the grouping error means
A PivotTable can group items only when Excel can treat the selected field as a consistent set of values. For example, a date field can be grouped into months and years when its entries are actual Excel dates. A numeric field can be grouped into ranges when its entries are numbers. If some entries are blanks, text, or values of another type, Excel may not be able to create one coherent group and may show the error.
The same message can have a different cause when the PivotTable uses the Excel Data Model or an external OLAP source. Those PivotTables have grouping restrictions that ordinary PivotTables do not. So the message does not necessarily mean the whole PivotTable is damaged; it usually points to either inconsistent source values or a limitation of the PivotTable’s source.
Check the source field before changing the PivotTable
Start with the column you are trying to group in the original source table, not just the labels displayed in the PivotTable. Look for empty cells, spaces, error values, text mixed with numbers, and dates that appear correct but are stored as text. A value such as 1/4/2025 can be a real date in one row and text in another, even though both look alike on screen.
- Blanks: Find genuinely empty cells and formulas that return an empty string. Either can cause trouble when grouping a date or numeric field.
- Inconsistent types: Check whether a numeric column contains entries such as N/A, a dash, or numbers imported as text.
- Unexpected characters: Look for leading or trailing spaces, nonbreaking spaces, or apostrophes that make an entry text.
- Errors: Replace or correct source errors such as #N/A in the field you intend to group.
- Unusual dates: Check for invalid dates, mixed date conventions, and dates outside the range you expect.
Filtering the source column can help reveal blank cells and unusual entries. Sorting can bring text or out-of-range values together, but inspect the actual source values rather than relying only on how they are formatted. A number formatted as a date is still a number; conversely, a date-looking string is not automatically a real date.
Fix date grouping problems
Date grouping is a frequent reason for this error. In a conventional PivotTable, Excel needs the source field to contain usable date values throughout the relevant records. If one row contains a text label such as Unknown, a blank, or a date stored as text, grouping the field by months or years may fail.
Correct the source column consistently. Replace missing dates with a suitable value only if that value makes sense for the data; otherwise, exclude or separately handle those records. Convert text dates to real dates using a deliberate conversion method, and verify the result by changing the cell format or checking the values in the formula bar. Changing the number format alone does not convert text into dates.
Then update the PivotTable. Click inside it and choose PivotTable Analyze > Refresh. If the source range has changed, choose PivotTable Analyze > Change Data Source and confirm that the full range or table is included. Once refreshed, right-click a date item in the PivotTable, choose Group, and select the intervals you need, such as Months and Years. Including Years matters when the source spans multiple years; grouping by month alone can combine January from different years.
If you want a clean month-by-month report and the source date field cannot be grouped, another dependable approach is to add separate Year and Month columns to the source data and use those fields in the PivotTable. This can also make the reporting logic easier to inspect and reuse.
Fix numeric grouping problems
For numeric grouping, check that every source value in the selected field is a number. Values imported from a text file may look numeric but remain text. A label such as Not entered, a blank, or an error among the values can stop Excel from dividing the field into numeric intervals.
After correcting the source, refresh the PivotTable and select a numeric item in the row or column field. Choose PivotTable Analyze > Group Selection, then set the starting value, ending value, and interval in the Grouping dialog. For example, a sales-amount field could be grouped in intervals of 100, provided the values are genuine numbers and the range is appropriate for the report. Check the proposed boundaries before accepting them so that the resulting groups cover the values you intend to summarize.
Do not confuse grouping numeric values with grouping text labels. A list of product names cannot be grouped into numeric intervals. You can manually group selected labels into categories, but first confirm that the PivotTable allows manual grouping and that the selection contains items from the same field.
Check whether the PivotTable uses the Data Model
Grouping through the usual PivotTable command may be unavailable when a PivotTable was created using the Data Model, an OLAP cube, or certain external connections. In these cases, the limitation is about the source architecture, not necessarily the quality of the data. Cleaning blanks and refreshing may not make the Group command available.
To check how the PivotTable was created, review its source or connection settings, or look at the options used when it was inserted. If the report needs grouped dates or numeric bands, consider creating the categories in the source data, using a calendar or lookup table in the model, or building a conventional PivotTable from a worksheet table instead. The right option depends on whether the report needs the Data Model’s relationships and larger-data capabilities.
Do not rebuild a model-based report as a standard PivotTable without considering what you would lose. The Data Model can support relationships between tables and other analysis features. If those are important, adding explicit Year, Month, or range-category fields to the model is usually more suitable than trying to force manual grouping.
Use a reliable troubleshooting sequence
Work through these checks in order. This helps distinguish a source-data problem from a PivotTable limitation without changing several things at once.
- Identify the exact field you are attempting to group and inspect its source column.
- Correct blanks, errors, text values, and inconsistent types in that field.
- Confirm that the PivotTable source includes the corrected rows and columns.
- Click inside the PivotTable and choose PivotTable Analyze > Refresh.
- Select one item in the target field, then choose PivotTable Analyze > Group Selection.
- If grouping is still unavailable, check whether the PivotTable uses the Data Model or an OLAP connection.
- If you changed the source range, verify the result after refreshing; recreate the PivotTable only if its source or structure cannot be corrected otherwise.
If a repaired field still appears to contain old items, check the PivotTable’s retained-item settings and refresh behavior. PivotTables can preserve items that have since disappeared from the source. Those old labels can be confusing, but they do not replace the need to correct the current source values. A refresh updates the report from its source; it does not automatically transform text into dates or repair invalid entries.
When helper columns are a better solution
Grouping in the PivotTable is convenient, but it is not always the clearest way to define reporting categories. A helper column makes the category visible in the source data and can be reused in other reports. For dates, separate Year and Month fields can make it obvious whether the report should combine the same month across years or keep each year distinct. For sales or age bands, a category field can label each record with the range it belongs to.
Helper columns are especially useful when the grouping rules are business-specific, when the source contains a Data Model, or when multiple people need to understand the categories. Document how boundaries work: for example, whether a value of 100 belongs in the 0–99 group or the 100–199 group. Clear rules prevent confusion at group edges.
Another option is to group labels manually in a conventional PivotTable. Select multiple items from the same row or column field, then use PivotTable Analyze > Group Selection. This creates a grouped field in the PivotTable; it does not clean or recategorize the original source column. If the source changes substantially, review those manual groups because newly added items may need to be assigned.
Common mistakes to avoid
- Formatting instead of converting: Applying a date or number format changes how a value displays, not whether text becomes a real date or number.
- Fixing only the visible rows: A filtered source can hide the bad entry. Inspect the full field, including rows currently excluded from the PivotTable view.
- Refreshing before fixing the source: Refreshing imports the existing values; it does not correct blanks or inconsistent data types.
- Grouping the wrong item: Click a value in the field to be grouped. Selecting a subtotal, a value-area cell, or items from different fields may not invoke the intended operation.
- Assuming every PivotTable supports grouping: Model-based and OLAP PivotTables can have restrictions even when their data looks clean.
In Excel for Microsoft 365 on Windows, the contextual PivotTable Analyze tab appears when you click inside a PivotTable. Excel for Mac has a similar PivotTable ribbon, but the tab names and command placement can vary by release. Excel for the web may not expose every desktop grouping control; if the command is missing, open the workbook in the desktop app and check the source and PivotTable type there.
Frequently Asked Questions
Why can’t I group dates in my PivotTable?
Usually, the source date field contains a blank, text value, error, or date stored as text. Check the entire source column, correct the inconsistent entries, refresh the PivotTable, and try grouping again.
Can I group months from different years together?
Yes. In the Grouping dialog, choose Months. If you need to keep the years distinct, select Years as well as Months so that January 2024 and January 2025 remain separate combinations.
Will changing the cell format fix dates stored as text?
No. Formatting changes the display, not the underlying value type. Convert the text to real dates, verify the conversion, and refresh the PivotTable before grouping.
Why is Group Selection greyed out?
The selection may not be a groupable item, or the PivotTable may use the Data Model or an OLAP source. Click a single item in the target field first, then check the PivotTable’s source type if the command remains unavailable.
Can I group a PivotTable field that contains blanks?
Blanks can prevent grouping date or numeric fields. Decide how missing records should be handled, correct or separate them in the source, and refresh. Do not replace blanks with an invented date or number that could misrepresent the data.
Does refreshing the PivotTable fix the error by itself?
Only if the source has already been corrected or the PivotTable was using outdated data. Refreshing does not clean the source or change text values into numbers or dates.
Related
- Databricks Notebook: How to Split a Cell
- 2 Criteria Conditional Formatting in Excel: Two Methods
- Power Query: What It Contains and How It Works
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Chart Labels in Google Sheets: Add, Edit, and FormatTo add chart labels in Google Sheets, open the chart, choose Customize in the Chart editor, then use…
- Microsoft Excel Combo Charts: How to Create and FormatA Microsoft Excel combo chart displays two or more data series as different chart types, such as columns…
- Can You Make a Stacked Waterfall Chart in Excel?Yes—but Excel does not provide a native chart type that combines stacked components with waterfall steps. In Microsoft…
- Excel Chart Axis Range: Set Minimum and Maximum ValuesTo change an Excel chart’s numeric axis range in Microsoft 365 for Windows, select the chart axis, right-click…
- Free Excel Project Gantt Chart Template: How to Use ItYes—free Excel project Gantt chart templates are available, including templates listed through Microsoft Create and downloadable spreadsheets from…
- Excel Bar Graph Creation: Steps, Tips, and FixesTo create a bar graph in Excel for Microsoft 365 on Windows, select a labeled data range, then…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.