Often you may want to sort the rows in a pivot table in Excel by date.
Fortunately this is easy to do using the sorting options in the dropdown menu within the Row Labels column of a pivot table.
The following example shows exactly how to do so.
Example: Sort Pivot Table by Date in Excel
Suppose we have the following dataset in Excel that shows the number of sales on various dates:
Before creating a pivot table for this data, click on one of the cells in the Date column and make sure that Excel recognizes the cell as a Date format:
Next, we can highlight the cell range A1:B10, then click the Insert tab along the top ribbon, then click PivotTable, and insert the following pivot table to summarize the total sales for each date:
Since Excel recognizes the date format, it automatically sorts the pivot table by date from oldest to newest date.
However, if we’d like to sort from newest to oldest then we can click on the dropdown arrow next to Row Labels and click Sort Newest to Oldest:
The rows in the pivot table will automatically be sorted from newest to oldest:
To sort from oldest date to newest date, simply click the dropdown arrow next to Row Labels again and then click Sort Oldest to Newest.
The following tutorials explain how to perform other common operations in Excel:
Excel: How to Filter Top 10 Values in Pivot Table
Excel: How to Sort Pivot Table by Grand Total
Excel: How to Calculate the Difference Between Two Pivot Tables