ExcelUnpackUnpack Excel, one formula at a time.
Log inSign up

Lesson 77 · Pivot tables

Sort a pivot table in Excel

Sort a pivot table to put the biggest or smallest first. Right-click a number and pick a sort, or use the ▾ on Row Labels to sort by name.

Practice this lesson →Pro lesson. The first 4 lessons are free.

What you will learn

  • Sort from largest to smallest
  • Sort from smallest to largest

How it works

Right-click any number in the pivot table. Click Sort, then Sort Largest to Smallest. Now the biggest line is at the top.

Another way: click the ▾ on Row Labels, click More Sort Options, pick Descending by the numbers, and click OK. This also works on a phone.

Where things go

Right-click › Sort › Largest to Smallestbiggest first
Right-click › Sort › Smallest to Largestsmallest first
Row Labels ▾ › Sort A to Zby name

Example

Make a pivot table. Show the total Amount for each Region. Put the biggest region first.

The data (first rows):

ABCDEF
1OrderRegionProductMonthAmountStatus
21001NorthLaptopJan$1,370.00Shipped
31002NorthLaptopJan$790.00Shipped
41003WestPhoneJan$460.00Shipped
51004WestTabletJan$320.00Pending
61005WestTabletJan$550.00Shipped
71006WestPhoneJan$710.00Pending
81007NorthTabletJan$430.00Shipped

Click inside the data, then Insert › PivotTable › OK. Rows: Region. Values: Sum of Amount.

The pivot table you get:

Row LabelsSum of Amount
West$11,910.00
South$10,180.00
North$9,930.00
East$4,470.00
Grand Total$36,490.00

When to use it

  • Top regions at the top
  • Products with the fewest orders first
  • Names in A to Z order

Common mistakes

  • Sorting the source data insteadSort inside the pivot table.
  • Sorting by name when you wanted numbersRight-click a number to sort by the numbers.
  • Expecting the Grand Total to moveThe Grand Total always stays at the bottom.

Practice it on a real sheet

Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.

Sort a pivot table in Excel: how it works, with examples · ExcelUnpack