Fix Incorrect Date Sorting in an Excel PivotTable After Grouping
Question details
The user needs grouped dates in an Excel PivotTable to sort in the correct chronological order.

- Product
- Microsoft Excel PivotTable
- Device & OS
- not provided
- Scenario
- Sorting grouped PivotTable dates after changes to the source data.
- Observed behavior
- The displayed days are out of order, and sorting newest to oldest does not produce the expected result even after refreshing.
Locate the PivotTable's source date column and open the PivotTable Fields pane to see which date groups are in the report. Check whether you need to preserve time-of-day information before removing time components.
Check source dates and refresh the PivotTable
Use this method to resolve sorting problems caused by text dates or hidden time values.
In an empty source-data column, enter =ISNUMBER(A2), replacing A2 with the first date cell, and fill the formula down. FALSE indicates that the value is not a numeric Excel date.
Select the text date cells and choose Data > Text to Columns. On the final screen, select Date and the matching source date order, then click Finish. Correct any blank or invalid values separately.
If time of day is not needed, enter =INT(A2) in a helper column and fill it down after converting the dates. Format the helper column as a date, then use it as the PivotTable date field.
Select the PivotTable and choose PivotTable Analyze > Refresh, or Refresh All. Right-click a date label and choose Sort > Sort Oldest to Newest or Sort Newest to Oldest.

Recreate the PivotTable date grouping
Use this when corrected source dates still sort incorrectly after a refresh.
Work with PivotTables in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar interface for working with spreadsheets. Open compatible Excel files in WPS Spreadsheets to continue reviewing data and PivotTable reports as you migrate.

Frequently Asked Questions
Why do dates look correct but sort incorrectly in my PivotTable?
A date format can hide a time component, and a value that looks like a date may be stored as text. Use =ISNUMBER(A2) to check whether a source value is numeric, and inspect or remove time values if they are not needed.
How do I refresh a PivotTable after correcting dates?
Select the PivotTable and choose PivotTable Analyze > Refresh. To refresh all applicable data connections and PivotTables, choose Refresh All.
Why are days not in chronological order across months?
The grouping and field layout may be displaying day labels within separate month or year groups. Check the PivotTable Fields pane and group by Years, Months, and Days as needed, then sort the relevant date labels.
What should I check if recreating the grouping does not fix the sort?
Review the source date values, the PivotTable Fields layout, and the sort applied to each grouped field. Gather those details and the steps used to create the PivotTable for further diagnosis.




