Simon Sez IT

Online software training and video tutorials for Microsoft, Adobe & more

  • Course List
    • Adobe
      • Dreamweaver
        • Dreamweaver CC
        • Dreamweaver CS6
        • Dreamweaver CS5
        • Dreamweaver CS4
      • Flash
        • Flash CS5
      • InDesign
        • InDesign CS6
        • InDesign CS5
      • Photoshop
        • Photoshop CS6
        • Photoshop CS5
        • Adobe Photoshop CS4
      • Photoshop Elements
        • Photoshop Elements 2022
        • Photoshop Elements 2019
        • Photoshop Elements 2018
        • Photoshop Elements 15
        • Photoshop Elements 14
        • Photoshop Elements 13
        • Photoshop Elements 12
        • Photoshop Elements 11
        • Photoshop Elements 10
        • Photoshop Elements 9
        • Photoshop Elements 8
    • Microsoft
      • Access
        • Access 2021 Beginners
        • Access 2019
        • Access 2019 Advanced
        • Access 2016
        • Access 2016 Advanced
        • Access 2013
        • Access 2013 Advanced
        • Access 2010
        • Access 2010 Advanced
        • Access 2007
      • Excel
        • Data Analytics in Excel
        • Excel 2021 Advanced
        • Excel 2021 Intermediate
        • Excel 2021 Beginners
        • PivotTables for Beginners
        • Excel Dashboards
        • Advanced Formulas in Excel
        • Excel for Business Analysts
        • Advanced PivotTables
        • Power Pivot, Power Query and DAX in Excel
        • Excel 2019 Beginners (Mac)
        • Excel 2019 Beginners
        • Excel 2019 Advanced
        • Excel 2016 Beginners
        • Excel 2016 Intermediate
        • Excel 2016 Advanced
        • Excel 2013
        • Excel 2013 Advanced
        • Excel 2010 Beginners
        • Excel 2010 Advanced
        • Excel 2007
      • OneNote
        • OneNote Desktop and Windows 10
        • OneNote 2016
      • Outlook
        • Outlook 2021
        • Outlook 2019
        • Outlook 2016
        • Outlook 2013
        • Outlook 2010
        • Outlook 2007
      • Power Automate
        • Introduction to Power Automate
      • Power BI
        • Power BI
        • Power BI Intermediate
      • PowerPoint
        • PowerPoint 2021
        • PowerPoint 2019
        • PowerPoint 2016
        • PowerPoint 2013
        • PowerPoint 2010
        • PowerPoint 2007
      • Project
        • Project 2021 Beginners
        • Project for the Web
        • Project 2019
        • Project 2019 Advanced
        • Project 2016
        • Project 2016 Advanced
        • Project 2013
        • Project 2013 Advanced
        • Project 2010
        • Project 2010 Advanced
      • Publisher
        • Publisher 2013
      • SharePoint
        • SharePoint Online
        • SharePoint Foundation 2013
        • SharePoint Server 2013
        • SharePoint Foundation 2010
      • Teams
        • Microsoft Teams
      • VBA
        • Macros and VBA for Beginners
        • VBA for Excel
        • VBA Intermediate Training
      • Visio
        • Microsoft Visio 2019
        • Visio 2016
        • Visio 2013
        • Microsoft Visio 2010
      • Windows
        • Windows 11
        • Windows 10 (2020 Update)
        • Windows 10
        • Windows 8
        • Windows 7
        • Windows Vista
      • Word
        • Word 2021
        • Word 2019 Advanced
        • Word 2019
        • Word 2016
        • Word 2013
        • Word 2010
        • Word 2007
    • QuickBooks
      • QuickBooks
        • QuickBooks Desktop Pro 2022
        • QuickBooks Pro 2021
        • QuickBooks Online Advanced
        • QuickBooks Online
        • QuickBooks Canada
        • QuickBooks Pro 2020
        • QuickBooks 2019
        • QuickBooks 2018
        • QuickBooks Pro 2017
        • QuickBooks Pro 2016
        • QuickBooks Pro 2015
        • QuickBooks Pro 2014
        • QuickBooks Pro 2013
        • QuickBooks Pro 2012
        • QuickBooks Pro 2011
        • QuickBooks Pro 2010
        • QuickBooks Pro 2009
    • Web Development
      • AngularJs
        • AngularJS Crash Course
      • Dreamweaver
        • Dreamweaver CC
        • Dreamweaver CS6
        • Dreamweaver CS5
        • Dreamweaver CS4
      • Bootstrap
        • Bootstrap Framework
      • Html/CSS
        • HTML/CSS Crash Course
        • HTML5 Essentials
      • Python
        • Python Object-Oriented Programming
        • Pandas for Beginners
        • Introduction to Python
      • Java
        • Java for Beginners
      • JavaScript
        • JavaScript for Beginners
        • jQuery Crash Course
      • MySql
        • MySQL for Beginners
      • PHP
        • PHP for Beginners
        • Advanced PHP Programming
      • XML
        • XML Crash Course
    • Data Analysis
      • Financial Modeling
        • Financial Risk Management
        • Financial Forecasting and Modeling
      • Alteryx
        • Alteryx Advanced
        • Introduction to Alteryx
      • Power BI
        • Power BI Intermediate
        • Power BI
      • Qlik Sense
        • Qlik Sense Advanced
        • Qlik Sense
      • R Programming
        • R Programming
      • Tableau
        • Tableau Desktop Advanced
        • Tableau Desktop
      • Python
        • Python Object-Oriented Programming
        • Pandas for Beginners
        • Introduction to Python
    • Work Productivity
      • Google Sheets
        • Google Sheets for Beginners
      • Confluence
        • Introduction to Confluence
      • Monday
        • Getting Started in Monday.com
      • Asana
        • Asana for Employees and Managers
        • Introduction to Asana
      • Jira
        • Getting Started in Jira
  • For Business
  • About Us
    • Testimonials
    • Contact Us
    • FAQ
    • Membership
    • About Us
  • Pricing
  • Free Resources
  • Sign In
  • Get Started
Home > Microsoft Excel > How to Sort a Pivot Table in Excel? 6 Best Methods

How to Sort a Pivot Table in Excel? 6 Best Methods

Note: This tutorial on how to sort a pivot table in Excel is suitable for all Excel versions including Office 365. 

Sorting is a very commonly used Excel feature that I am sure you have come across many times. 

It is fairly straightforward to sort your data in an Excel spreadsheet. But, when it comes to sorting data inside a pivot table, things get very interesting. 

This is because Pivot Table sorting has its own constraints and pitfalls. It is very easy to commit mistakes and end up in a confusing situation if one is not careful enough. 

In this guide, I’ll walk you through the various methods and tricks to sort a pivot table in Excel. 

Table Of Contents
  1. How to Sort a Pivot Table in Excel Using Labels?
  2. How to Sort a Pivot Table in Excel by Values?
  3. Sorting a Pivot Table with Multiple Category Fields
  4. How to Fix If Newly Added Pivot Table Items are Out of Order?
  5. How to Fix if the Pivot Table Report Filter is Out of Sort Order? 
  6. How to Sort the Pivot Table Horizontally? 
  7. Closing Thoughts

Related:

How to Autofit Excel Cells? 3 Best Methods

How to Add Subscript in Excel? (6 Best Methods)

How to Delete a Pivot Table in Excel? 4 Best Methods

How to Sort a Pivot Table in Excel Using Labels?

It is straightforward to sort a Pivot Table using labels in alphabetical order. All you need  to do is to follow these steps: 

  1. Click on any cell in the Pivot Table field based on which you need to sort. 
  1. Click on the Alphabetical Sort option (AZ or ZA for ascending or descending respectively) inside the Data tab. 
How to sort a pivot table in Excel alphabetically?
Click on the Alphabetical Sort Option inside the Sort & Filter group of the Data tab.

Your entire pivot table will be sorted based on the alphabetical order of the column you just selected. 

How to Sort a Pivot Table in Excel by Values?

In case you want to sort your Pivot table using a value field, follow these steps:

  1. Click on any cell in the value field of your Pivot Table based on which you need to sort. 
  2. Click on the Sort option inside the Data Tab and choose whether you want to sort from the smallest to largest values or vice versa. You can also use the Alphabetical sort option here. 
In the Sort by Value window choose Largest to smallest or smallest to largest
In the Sort by Value window choose Largest to smallest or smallest to largest

Now, the Pivot Table will be sorted based on the numerical values of the pivot table field you just selected. 

Also Read:

How to Add Error Bars in Excel? 7 Best Methods

How to Enable Excel Dark Mode? 3 Simple Steps

How to Group Worksheets in Excel? (In 3 Simple Steps)

Sorting a Pivot Table with Multiple Category Fields

Here is an interesting feature to note about Pivot Table sorting. If you have multiple category fields in the pivot table, the data will be sorted only inside and after the subcategories you selected for sorting. 

The sorting will not be applied to the entire Pivot Table. Hence, it is always important to pay attention not only to the field you are selecting for sorting but also to the sub-category you are trying to sort.

sorting a pivot table with multiple category fields
In this example, only the products are sorted in reverse alphabetical order. The regions are not sorted in any order.
Sorting pivot tables with multiple categories
In this example, only the subtotals of the product revenue are sorted in descending order. Notice, that the regional revenues are not sorted in any order.

This is not a bug rather, it is a feature of the Pivot table. 

Similarly, any field will be sorted independently for the category and subcategories of the pivot table. 

Sorting multiple category fields in a pivot table
In this example, the product field and the regional review fields are independently sorted.

How to Fix If Newly Added Pivot Table Items are Out of Order?

Sometimes, if you add new rows of data to the Pivot Table source, they will not appear in the correct sort order in the Pivot table. If this persists even after refreshing the pivot table, you can try the following steps: 

  1. Right-click on any cell in the Pivot Table field, based on which you want to sort. 
Right-click on any cell which is not following the sort order and choose the correct Sort order
Right-click on any cell which is not following the sort order and choose the correct Sort order
  1. Choose an Ascending or Descending sort order. 

This will change the sorting mode of the Pivot table to the automatic mode from manual mode. Thereafter, all the newly added items will be sorted automatically based on the sorting preference. 

How to Fix if the Pivot Table Report Filter is Out of Sort Order? 

The same problem might occur with the report filter of the Pivot Table. That is the newly added items of the Pivot Table will not appear in the correct sort order inside the report filter drop-down menu.

This is because the default sorting mode is set to manual, as seen before. 

To fix this, follow these steps: 

  1. Temporarily drag the filter field to the values field in the Pivot Table values pane. 

This is because you cannot sort them unless they are in the values field. 

  1. Right-click on any cell in the Pivot Table field based on which you want to sort. 
  1. Choose an Ascending or Descending sort order. 
  1. Move the field back to the filter field in the Pivot Table values pane. 

This will change the sorting mode to automatic. The new items will appear in the correct sort order inside the filter drop-down menu. 

How to Sort the Pivot Table Horizontally? 

Sometimes, you may need to sort the pivot table horizontally from left to right. To do this, follow these steps. 

  1. Right-click on any cell in the row, based on which you want to sort horizontally. 
  1. Under Sort, choose More Sort Options. 
  1. Click on ‘Left to Right’ under sort direction in the Sort by Values dialogue box. 
Choose More Sort Options under the Sort menu.
Choose More Sort Options under the Sort menu.
  1. Choose the sort order e.g. ‘Smallest to Largest’ or vice versa. 
Choose the Sort direction and click OK
Choose the Sort direction and click OK

This will sort the Pivot Table in the horizontal direction. Note that the sort order applies only to the row you selected and not to the entire Pivot Table. 

Suggested Reads:

The Excel CHOOSE Function – 4 Best Uses

The FORMULATEXT Excel Function – 2 Best Examples

How to Make a Line Graph in Excel? 4 Best Line Graph Examples

Closing Thoughts

That’s everything about how to sort a pivot table in Excel. Test these methods in a practice worksheet and feel free to ask any questions or doubts you may have in the comments section. 

If you like this guide and want more high-quality tutorials on Excel check out our free Excel resources centre. 

Ready to take the next step and hone your skills in Excel?

Simon Sez IT has been teaching Excel for over ten years. For a low, monthly fee you can get access to 100+ IT training courses. Click here for advanced Excel courses with in-depth training modules.

Adam Lacey

Adam Lacey is an Excel enthusiast and online learning expert. He combines these two passions at Simon Sez IT where he wears a number of different hats. When Adam isn't fretting about site traffic or Pivot Tables, you'll find him on the tennis court or in the kitchen cooking up a storm.

Most Popular Posts

  • Kanban vs Scrum: Project Management Methodologies and Their Differences [2022]
  • How to Insert a Checkbox in Excel? 3 EASY Examples
  • How to Autofit Excel Cells? 3 Best Methods
  • XLOOKUP Google Sheets – 4 Best Alternatives!
  • Dashboards in Excel Using Pivot Tables, Pivot Charts and Slicers
  • Free Microsoft Project Training Course
  • Free Microsoft Access Tutorial for Beginners (3.5 Hours Video)
  • How to Use Blending Mode With Layers in Adobe Photoshop Elements 15

Similar Posts

Editing Images with Photoshop CS6 Camera Raw

How to Make a Pie Chart in Excel? A Step by Step Guide

Tracing Task Paths in Microsoft Project 2013

How to Create Pivot Charts in Excel 2013

Take Your Database Online with New Features for Access 2013

How to Recover Unsaved Excel File? – 3 Ways

Course Categories

  • Adobe
  • Data Analysis
  • QuickBooks
  • Microsoft
  • Web Development
  • Work Productivity

About Us

  • About Us
  • Free Resources
  • Affiliates
  • Become an Instructor

Products

  • Pricing and Plans
  • Business Pricing
  • Government Discounts
  • Non-Profit Discounts

Support

  • FAQ’s
  • Contact Us
  • DVD support

Connect

YoutubeFacebookLinkedIn
© 2023 Simon Sez IT, Inc.
  • Terms
  • Privacy Policy
  • Sitemap
888.817.6665 Monday thru Friday 7:30 a.m. - 5:00 p.m. (ET)