Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

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

  1. In the PivotTable, click any field in the column that contains the items that you want to sort.

  2. On the Data tab, click Sort, and then click the sort order that you want. For additional sort options, click Options.

    Choose a sort order

    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.

Sort smallest to largest

In the example shown below, the data in the Transportation column is sorted smallest to largest.

Select a cell

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.

Select a total

Set custom sort options

To sort specific items manually or change the sort order, you can set your own sort options.

  1. Click a field in the row or column you want to sort.

  2. Click the arrow Filter drop-down arrow next to Row Labels or Column Labels.

    Choose custom criteria

  3. 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.)

  4. 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.

    Limit results to one month<insert sort6 & sort7>

    Results from limiting sort to one month

  5. Click outside the custom sort dialog box to close it.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×