You can sort a Pivot Table in Excel horizontally or vertically. This allows you to see, at a glance, the rows or columns containing the greatest or the smallest values.
We will illustrate how to sort the values in a Pivot Table, using the above example pivot table on the right, which shows a company's monthly sales, broken down by sales representative.
In order to sort a column or row of the Pivot Table, we use the Excel Sort Ascending and Sort Descending commands which are represented by the following symbols in the Excel menu:
|In Excel 2007-2013:||In the 'Home' tab, under the 'Sort & Filter' option or|
By right-clicking on the Pivot Table column and selecting the 'Sort' option
|In Excel 2003:||In the 'Standard' toolbar or|
in the 'Data' menu, within the 'Sort...' option
Imagine you want to easily see which months recorded the highest total sales values. By sorting the 'Grand Total' column of the pivot table, in descending order, the month with the greatest total sales figures is positioned at the top of the table, followed by the second greatest sales figure, etc.
To sort the pivot table by the values in the 'Grand Total' column:
The resulting sorted Pivot Table is shown on the rightabove. This enables you to easily see that the month with the highest sales was June, followed by October.
Imagine you want to order the yearly sales totals, so that the person with the smallest total yearly sales is listed first.
To do this:
The resulting sorted Pivot Table is shown on the rightabove. As required, the individuals have been ordered, so that the lowest total sales ($576,817) appears first.
Note that you could also sort the table alphabetically, according to the sales peoples' names. This is done by clicking on one of the names (either cell B4 or C4) and sorting either in ascending or descending order.