Excel 2024: Sort Subtotals


April 24, 2024 - by

Excel 2024: Sort Subtotals

This tip is from my friend Derek Fraley in Springfield, Missouri. I was doing a seminar in Springfield, and I was showing my favorite subtotal tricks.

For those of you who have never used subtotals, here is how to set them up.

Start by making sure your data is sorted. The data below is sorted by customers in column C.

Columns for Sales Rep, Date, Customer, Quantity, Revenue, Cost, and Profit. The data is sorted by Customer (column C).
Columns for Sales Rep, Date, Customer, Quantity, Revenue, Cost, and Profit. The data is sorted by Customer (column C).

From the Data tab, choose Subtotals. The Subtotal dialog box always wants to subtotal by the leftmost column. Open the At Each Change In dropdown and choose Customer. Make sure the Use Function box is set to Sum. Choose all of the numeric fields, as shown here.

The Subtotal dialog box says: At Each Change in Customer, Use Function Sum, Add Subtotal To Quantity, Revenue, Profit. The boxes for Replace Current Subtotals and Summary Below Data are checked. The box for Page Break Between Groups is unselected. There are three buttons at the bottom of the dialog: Remove All, OK, and Cancel. To add the subtotals, click OK.
The Subtotal dialog box says: At Each Change in Customer, Use Function Sum, Add Subtotal To Quantity, Revenue, Profit. The boxes for Replace Current Subtotals and Summary Below Data are checked. The box for Page Break Between Groups is unselected. There are three buttons at the bottom of the dialog: Remove All, OK, and Cancel. To add the subtotals, click OK.

When you click OK, Excel inserts a subtotal below each group of customers. But, more importantly, it adds Group and Outline buttons to the left of column A.

continue reading »

More Reading


Excel 2024: Sort Left to Right

Excel 2024: Sort Left to Right »

April 22, 2024 - by Bill Jelen


Every day, your IT department sends you a file with the columns in the wrong sequence. It would take them two minutes to change the query, but they have a six-month backlog, so you are stuck rearranging the columns every day.

Excel 2024: Sort East, Central, and West Using a Custom List

Excel 2024: Sort East, Central, and West Using a Custom List »

April 19, 2024 - by Bill Jelen


At my last day job, we had three sales regions: East, Central, and West. The company headquarters was in the East, and so the rule was that all reports were sorted with the East region first, then Central, then West. Well, there is no way to do this with a normal sort.

Excel 2024: Set Up Your Data for Data Analysis

Excel 2024: Set Up Your Data for Data Analysis »

April 17, 2024 - by Bill Jelen


Make sure to follow these rules when you set up your data for sorting, subtotals, filtering and pivot tables.

read more articles »

Featured Products


Guerrilla Data Analysis Using Microsoft Excel - 3rd Edition

May 2022

Two of the leading Excel channels on YouTube join forces to combat bad data. This book includes step-by-step examples and case studies that teach users the many power tricks for analyzing data in Excel. These are tips honed by Bill Jelen, "MrExcel," and Oz do Soleil during their careers run as financial analysts.


MrExcel 2024 Igniting Excel

February 2024

This is the 7th edition of MrExcel XL. Updates for 2024 include: Remove Filter Items Using Search Box, The Consolas Font Makes it Easy to Tell Zero from the Letter O, Display Online Pictures In a Cell Using a Formula, Place Pictures In Cell From Local Computer, Using Artificial Intelligence with Copilot for Excel, and more...


Microsoft Excel Inside Out (Office 2021 and Microsoft 365)

December 2021

Dive Into Microsoft Excel for Office 2021 and Microsoft 365 and really put your spreadsheet expertise to work. This supremely well-organized reference packs hundreds of timesaving solutions, tips, and workaroundsall you need to make the most of Excels most powerful tools for analyzing data and making better decisions.


Supercharge Power BI - 3rd Edition

February 2021

Released in 2021, this book will teach you the DAX language from the ground up, using Power BI as your canvas.


see more products »