How can I sort a pivot table in Excel by date? 2

How can I sort a pivot table in Excel by date?

To sort a pivot table by date in Excel, follow these steps:

1. Select any cell within the pivot table.
2. Go to the “PivotTable Tools” tab and click on “Options” in the “Data” section.
3. In the “Sort & Filter” group, click on “Sort.”
4. In the “Sort by” dropdown menu, select the column that contains the dates.
5. In the “Order” dropdown menu, select “Oldest to Newest” or “Newest to Oldest” depending on your preference.
6. Click “OK” to apply the sorting to the pivot table.

This will arrange the data in the pivot table based on the dates in the selected column, either in ascending or descending order. This feature is useful for organizing and analyzing data chronologically in a pivot table format.

Excel: Sort Pivot Table by Date


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:

Excel sort pivot table by date

The rows in the pivot table will automatically be sorted from newest to oldest:

Excel pivot table sort oldest to newest date

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.

Additional Resources

Cite this article

stats writer (2024). How can I sort a pivot table in Excel by date?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-sort-a-pivot-table-in-excel-by-date/

stats writer. "How can I sort a pivot table in Excel by date?." PSYCHOLOGICAL SCALES, 28 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-sort-a-pivot-table-in-excel-by-date/.

stats writer. "How can I sort a pivot table in Excel by date?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-sort-a-pivot-table-in-excel-by-date/.

stats writer (2024) 'How can I sort a pivot table in Excel by date?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-sort-a-pivot-table-in-excel-by-date/.

[1] stats writer, "How can I sort a pivot table in Excel by date?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How can I sort a pivot table in Excel by date?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top