How to Sort a PivotTable? Ascending, Descending, and Manual Sorting

Explain clearly how to sort a PivotTable by amount, covering three methods: descending order, ascending order, and manual dragging. Also give guidance on determining the sort basis, the operating steps, and how to verify the results after sorting.

Key points of this article

  • To rank by amount, sort by the numeric column holding the summary values, in ascending or descending order, rather than sorting the row labels.
  • Drag the row labels manually only when the order has a fixed requirement; after new categories are added, the manual order must be checked again.
  • Numbers stored as text will scramble the sorting, so convert the source data to numeric format first, then refresh the pivot table.
  • After sorting, check the summary value in the first row, the refresh status, and the totals to confirm the results match the source table.

When building tables, I often run into this situation: in a PivotTable, the departments or products are listed alphabetically, but you'd rather see the ones with the highest amounts at the top. How to sort a PivotTable is a point where many people get stuck the first time they use it.

This article covers one thing only: adjusting the order of rows in a PivotTable, including sorting by value in ascending or descending order, and manual dragging. It does not explain how to create a PivotTable or how to format it. After reading, you should be able to decide which sorting method to use and verify whether the results are correct.

Sorting is usually based on aggregated values, such as the total sales for each region, rather than the row order of the raw detail table. Once you understand this, you won't keep sorting the source table and wondering why nothing changes.

How do I sort a PivotTable? One-sentence answer

To sort by amount, sort the numeric summary column directly in ascending or descending order. If the order has special requirements, drag the row labels manually.

Your situationRecommended PracticesCause
Make the higher amounts appear at the top.Sort the numeric summary column in descending order.Sort by value; the order updates automatically when the data changes.
I want to view quantities or dates in order from smallest to largest.Sort the numeric summary column in ascending order.Smaller values first, to make it easier to spot the low-end data.
The order is fixed; for example, the North District must come before the South District.Manually drag row labelsA fixed order cannot be expressed by a numerical or alphabetical rule.
Only want to sort by name alphabetically or by pinyinSort row labels in ascending or descending orderText fields are sorted in alphabetical or pinyin order.
Data is updated frequently.Sort by numerical value firstManual positions need to be readjusted after a new category is added.

Before You Begin: Confirm These Points

  • Confirm which column the sort is based on. Sorting by the value column orders results by amount; sorting by the row label column orders them by name. The two look similar but mean different things.
  • Confirm the PivotTable has been refreshed. If the source data changed but the PivotTable was not refreshed, sorting will still work on the old figures.
  • Confirm whether there are filters or groupings. When groups exist, sorting may only apply within each group, so the result can differ from what you expect.
  • Confirm the source data is in numeric format. If numbers are stored as text, "10" will sort before "9". This is a common cause of scrambled sorting.
  • Confirm whether the data source is a scanned document. If the data comes from a PDF table, you can use a general check: in a PDF reader, try selecting a piece of text. If you can select and copy it, the file is text-based; if you cannot select it, it is most likely a scanned image and needs OCR first.

Steps to Sort by Amount in Descending Order in Excel

  1. Open the finished PivotTable and find the summary value column to sort, such as the total column for sales amount.
  2. Check whether the numbers in the source table are right-aligned and can be summed, and confirm that they are numeric values rather than text.
  3. In the PivotTable, click any value cell in that summary value column, making sure the selection is inside the PivotTable.
  4. Open the dropdown button next to the row labels and find the sorting-related options.
  5. Select the descending option so that the summary values are arranged from largest to smallest.
  6. Compare with the figures to check whether the first row is the category with the largest amount; if you need ascending order, do the same and then select the ascending option.
  7. Save the file, and when you open it next time, confirm again that the order has not been changed.

How to Manually Drag Row Labels

Manual sorting suits scenarios where the order has fixed requirements. Select a row label cell, move the mouse to the edge of the cell until the move cursor appears, then drag it to the target position and release.

When dragging, keep in mind that it only changes the order displayed this one time. If categories are added later, the new categories may appear in the default position, so you will need to check and adjust the order again.

Verify item by item after completion

Inspection itemHow should I look at it?What should I do if I have a problem?
Sort byIs the summary value in the first row larger?Return to the sorting settings and confirm that the numeric column was selected, not the label column.
Number formatAre the numbers in the source table right-aligned?Convert to numeric format, then refresh the pivot table
Is the data up to date?Most recent modification time of the source tableRefresh the pivot table, then recheck the order.
Do the totals match?Does the pivot table grand total match the source table total?Check whether there are duplicate or missing detail lines
Is the manual sequence complete?Are the newly added categories appearing in the appropriate positions?Add drag-and-drop support, or switch to sorting by value

📊 Core Comparison

Sort orderSuitable scenariosMain limitations
Sort by aggregate value in descending or ascending orderCompare the magnitude relationships of amounts, quantities, etc.It can only be sorted by numeric rules, and it cannot meet a fixed order.
Sort by row label letters or pinyinThere are many names, so quick lookup is needed.It cannot reflect performance or the size of the amount.
Manually drag row labelsThere is a fixed reporting order or business process.After adding or deleting a category, it needs to be readjusted.

❓ Frequently Asked Questions (FAQ)

1. Why haven't the numbers changed after sorting?

Usually the sort basis is wrong, or the PivotTable hasn't been refreshed. First refresh the PivotTable, then check that you are sorting by the summarized value column.

2. The number 10 comes before 9 — what should I do?

The numbers in the source table were stored as text. Convert the data column to a numeric format, then refresh the pivot table, and the order should return to normal.

3. Is the manually arranged order still preserved after data is updated?

Not necessarily. Newly added categories may appear in the default position, so you will need to recheck and drag them into place. Sorting by value is easier to keep consistent when the data changes.

4. How do tables in a PDF become data you can pivot?

Text-based PDFs can be exported to Excel using the PDF editor in the OmniDoc desktop client, download address download.omnidoc.top. Scanned documents must be processed with OCR before exporting. After exporting, please check the numbers item by item, especially decimal points, minus signs, and thousands separators.

📝 Summary

How to sort a PivotTable: the key is first to identify the sorting basis. To sort by amount, sort the Values (summary value) column in descending or ascending order; only drag the row labels manually when the order must follow a fixed requirement. After sorting, refresh and check the totals, and the results will be reliable.

Open OmniDoc and process your spreadsheet file

Updated 2026-11-29