You can use Excel’s Subtotals feature to subtotal data in a sorted list. To subtotal a data list, you first sort the list on the field for which you want the subtotals, and then you designate the field that contains the values you want summed — these don’t have to be the same fields in the data list.
SUBTOTAL Function in Excel A subtotal function is an inbuilt function in excel that is categorized under math/trig function Subtotal will not just total the numbers in a defined range of cells, it will help out by performing different arithmetic operations.
When you use the Subtotals feature, you aren’t restricted to having the values in the designated field added together with the SUM function. You can instead have Excel return the number of entries with the COUNT function, the average of the entries with the AVERAGE function, the highest entry with the MAXIMUM function, the lowest entry with the MINIMUM function, or even the product of the entries with the PRODUCT function.
To subtotal the salaries within each department in my example Employee Data list, first sort the list in A-to-Z order on the Dept column because Excel is to create a new subtotal at each change in the department entries within the list (Accounting, Administration, Engineering, and so on).
Excel does not allow you to subtotal a data list formatted as a table. Before you can use the Subtotal command button, you must first convert your table into a normal range of cells. To do this, click a cell in the table and then click the Design tab on the Table Tools contextual tab on the Ribbon.
Finally, click the Convert to Range command button in the Tools group followed by the Yes button in the alert dialog box asking you to confirm this action. Excel then removes the filter buttons from the columns at the top of the data list while still retaining the original table formatting.
The following figure illustrates how easy it is to use the Subtotals feature to obtain totals in a data list. The sample Employee data list is sorted first by the Dept field in ascending order and then by the Salary field in descending order (Largest to Smallest) and converted the data list to a range.
Then click the Subtotal command button on the Ribbon’s Data tab to open the Subtotal dialog box.
Here, the Dept field is selected as the field for which the subtotals are to be calculated in the At Each Change In drop-down list box, Sum as the function to use in the Use Function drop-down list box, and the Salary check box as the field whose values are to be summed in the Add Subtotal To list box.
The following figure shows the results obtained after clicking OK in the Subtotal dialog box. Here, you see the bottom of the data list showing the salary subtotals for the Administration, Engineering, Human Resources, and Information Services departments along with the grand total of the salaries for all the departments.
The grand total is displayed at the bottom of the data list because the Summary below Data check box is selected in the Subtotal dialog box — if you didn’t want a grand total, remove the check mark from this check box.
As you can see, when you use the Subtotals command, Excel outlines the data at the same time that it adds the rows with the departmental salary totals and the grand total. This means that you can collapse the data list down to just its departmental subtotal rows or even just the grand total row simply by collapsing the outline down to the second or first level.
(Remember that you can toggle between showing and hiding the outline symbols at the left edge of the data list by pressing Ctrl+8.)
In a large data list, you may want Excel to insert page breaks (often referred to as breaks) every time data changes in the field on which the list is being subtotaled (that is, the field designated in the At Each Change In drop-down list box).
To do this, you simply select the Page Break between Groups check box in the Subtotal dialog box to put a check mark in it before you click OK to subtotal the list.
How to quickly insert subtotals in Excel?
Supposing, you have large rows of data, sometimes, you want to insert subtotal formulas and grand totals for a column or columns, so that you can get valuable information. The Subtotal function in Excel can help you insert the SUM, AVERAGE, COUNT, MIN, MAX and other formulas that you need.
Maybe, sometimes, you need to insert the subtotals at the bottom of each page, but the Subtotal function just only can insert the subtotals for the category data not for the entire page data. Both of the two subtotals are useful for us. Today, I will introduce these two types of subtotals for you.
Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by80%
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than300 powerful features; Works with Office2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
Insert category subtotals with Subtotal function
Amazing! Using Efficient Tabs in Excel Like Chrome, Firefox and Safari!
Save 50% of your time, and reduce thousands of mouse clicks for you every day!
Supposing you have the following data as the screenshot shown, let’s look at how to use the Subtotal function of Excel.
1. Select the range that you want to insert the category subtotal.
2. Click Data > Subtotal, see screenshot:
3. In the Subtotal dialog box, please specify the following option:
- (1.) From At each change in drop down list, select the column you want your subtotals based on, in this example, I select Name.
- (2.) Select what type of subtotal formula you want to insert from Use function option, I choose the Sum function.
- (3.) Select which column you want subtotal inserted from Add subtotal to list box, I select sales volume($) to sum the values.
- (4.) If you’ve already inserted subtotals but you want to change them, you can check Replace current subtotals option;
- Page break between groups option can help you to insert page breaks for the category subtotals automatically.
- Summary below data: This inserts the subtotals at the bottom of each change in data. If you don’t check this option, the subtotals will be inserted at the top.
4. After specify the settings, click OK. You will get the following result:
Insert subtotals at the end of each page with Kutools for Excel
Supposing you have hundreds rows of data, and you want to automatically insert subtotals of each column at the bottom of each printed page. Of course, you can insert the subtotal formulas as you need manually at the correct position. But this will tedious and time consuming.
With Kutools for Excel’s Paging Subtotals, you can easily insert the subtotals at the bottom of each page at once.
Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 30 days. Get it Now
After installing Kutools for Excel, please do as follows:
1.Click Enterprise > Paging Subtotals, see screenshot:
2. In the Paging Subtotals dialog box, check the heading of column that you want to insert subtotal for it, if you don’t want to insert subtotal for some specific columns, please uncheck them. And then click on the function list to select the subtotal functions, such as sum, count, average, max, min, product and count numbers as your need. See screenshot:
3. Then click OK, two new rows of subtotals have been inserted for each page at the end of the data. See screenshots:
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by80%
- Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
- Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
- Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
- Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
- Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
- Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
- Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
- Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
- More than300 powerful features. Supports Office/Excel2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features30-day free trial.
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by50%, and reduces hundreds of mouse clicks for you every day!
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
- This content was really helpful. Thanks for sharing!