How to Sort Subtotals in Excel
In this tutorial, you will learn how to add and sort subtotals in Excel.
Sort Subtotals
To sort by subtotal, start by adding subtotals to the data. Once the data has subtotals, they can be sorted while maintaining the data structure and keeping grouped data together.
Say you have the following data structure:
You want to create a subtotal (by Total Sales in Column G) for every Product in Column C so you can sort by sales of each product without losing any of the detail. The prerequisite is that you have data sorted in a column that you are grouping (Product).
1. Click on any cell in the data range, and in the Ribbon, go to Data > Subtotal.
2. In the Subtotal window, (1) choose Product in the At each change in drop-down list. (2) In the Add subtotal to list, select Total Sales, and (3) click OK.
Now subtotals are added for each product.
3. Collapse the groups by clicking on the 2 (the outline bar number), so only the subtotals are displayed.
4. To sort subtotals, click on any Total Sales value in Column G, and in the Ribbon, go to Home > Sort & Filter > Sort Largest to Smallest.
As a result, all subtotals all sorted in descending order.