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 sales figures, broken down by month and 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 Current Versions of Excel:||Within the 'Sort & Filter' group on the 'Data' tab of the ribbon or|
By right-clicking on the Pivot Table 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 order the months of the example pivot table, so that the month that recorded the greatest total yearly sales is listed first.
To do this:
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 January.
Imagine you want to order the yearly sales totals, so that the person with the greatest total yearly sales is listed first.
To do this:
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.