To help you locate data that you want to analyze in a PivotTable more easily, you can sort text entries (from A to Z or Z to A), numbers (from smallest to largest or largest to smallest), and dates and times (from oldest to newest or newest to oldest).
When you sort data in a PivotTable, be aware of the following:
-
Sort orders vary by locale setting. Make sure that you have the correct locale setting in Language and Text in System Preferences on your computer. For information about changing the locale setting, see the Mac Help system.
-
Data such as text entries may have leading spaces that affect the sort results. For optimal sort results, you should remove any spaces before you sort the data.
-
Unlike sorting data in a range of cells on a worksheet or in an Excel for Mac table, you can't sort case-sensitive text entries.
-
You can't sort data by a specific format, such as cell or font color, or by conditional formatting indicators, such as icon sets.
Sort row or column label data in a PivotTable
-
In the PivotTable, click any field in the column that contains the items that you want to sort.
-
On the Data tab, click Sort, and then click the sort order that you want. For additional sort options, click Options.
Text entries will be sorted in alphabetical order, numbers will be sorted from smallest to largest (or vice versa), and dates or times will be sorted from oldest to newest (or vice versa).
Note: You can also quickly sort data in ascending or descending order by clicking A to Z or Z to A. When you do this, text entries are sorted from A to Z or from Z to A, numbers are sorted from smallest to largest or from largest to smallest, and dates or times are sorted from oldest to newest or newest to oldest.
Sort on an individual value
You can sort on individual values or on subtotals by right-clicking a cell, clicking Sort, and choosing a sort method. The sort order is applied to all the cells at the same level in the column that contains the cell.
In the example shown below, the data in the Transportation column is sorted smallest to largest.
To see the grand totals sorted largest to smallest, choose any number in the Grand Total row or column, and then click Sort > Largest to Smallest.
Set custom sort options
To sort specific items manually or change the sort order, you can set your own sort options.
-
Click a field in the row or column you want to sort.
-
Click the arrow next to Row Labels or Column Labels.
-
Under Sort, choose Ascending or Descending, and select from the options in the Sort by list. (These options will vary based on the your selections in steps 1 and 2.)
-
Under Filter, select any other criteria you might have. For example, if you wanted to see the data for March only, in the By label list, select Equals and then type March in the text box that appears. To include only certain data in your calculations, select or clear the the check boxes in the Filter box. To undo your selection, click Clear Filter.
<insert sort6 & sort7>
-
Click outside the custom sort dialog box to close it.