The Subtotal command allows you to automatically create groups and use common functions like SUM, COUNT, and AVERAGE to help summarize your data. For example, the Subtotal command could help to calculate the cost of office supplies by type from a large inventory order.
The Subtotal command will create a hierarchy of groups, known as an outline, to help organize your worksheet.
Important: Your data must be correctly sorted before using the Subtotal command
To create a subtotal in Excel:
In our example, we will use the Subtotal command with a T-shirt order form to determine how many T-shirts were ordered in each size (Small, Medium, Large, and X-Large).
This will create an outline for our worksheet with a group for each T-shirt size and then count the total number of shirts in each group.
First, sortyour worksheet by the data you wish to subtotal. In this example, we will create a subtotal for each T-shirt size, so our worksheet has been sorted by T-shirt size from smallest to largest.
Select the Data tab, then click the Subtotal command.
The Subtotal dialog box will appear. Click the drop-down arrow for the At each change in: field to select the column you wish to subtotal , In our example, we’ll select T-Shirt Size.
Click the drop-down arrow for the Use function: field to select the function you wish to use In our example, we’ll select COUNT to count the number of shirts ordered in each size.
In the Add subtotal to: field, select the column where you want the calculated subtotal to appear In our example, we’ll select T-Shirt Size.
When you’re satisfied with your selections then click OK.
The worksheet will be outlined into groups, and the subtotal will be listed below each group In our example, the data is now grouped by T-shirt size, and the number of shirts ordered in that size appears below each group.
To remove subtotals in Excel:
Sometimes you may not want to keep subtotals in your worksheet, especially if you want to reorganize data in different ways. If you no longer wish to use subtotaling, you’ll need removeit from your worksheet.
Select the Data tab, then click the Subtotal command.
The Subtotal dialog box will appear. Click RemoveAll.
All worksheet data will be ungrouped and the subtotals will be removed.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.