How to Sort a Pivot Table

Sorting a PivotTable in Excel can help you visualize data better, whether it’s identifying top buyers or analyzing other trends.

Preparing Your Data for a Pivot Table

Mark the data, click insert, and then click Pivot Table. It will create a pivot table.

pivot table sorting data

Check the label, then click on it, and drag it to the field of your need in your pivot table.

pivot table check label

How to Sort a Pivot Table by Values

Click the arrow on Row Labels or Column Labels, and then click the sort option you want. To sort data in ascending or descending order, click Sort A to Z or Sort Z to A.

pivot table sort a to z

Manual Sorting in a Pivot Table

For more sorting options, click More Options.

pivot table additional sorting options

Note: Manual sorting allows rearranging items by dragging, but values cannot be rearranged.

Ascending (A to Z) and Descending (Z to A) sort alphabetically or by the sum of quantities.

pivot table ascending a to z

Automatic Sorting in a Pivot Table

In More Options, enable Sort automatically every time the report is updated. This feature automatically sorts data when your pivot table is refreshed.

pivot table sort automatically

After this step the data in your pivot table will be sorted.

Note: If your Pivot Table is based on data in an Excel Table, you can also sort the source data directly by clicking the column header and choosing Sort A to Z or Sort Z to A. The Pivot Table will automatically update to reflect this change.