how to add subtotals to a table in excel

Mastering Excel: Add Subtotals to Your Table in Seconds

By John Lopez
AD

When working with large datasets in Excel, it's often useful to add subtotals to quickly view and analyze sections of a table. This can be especially helpful when comparing sales, tracking expenses, or assessing other categories of data. Here's a step-by-step guide on how to add subtotals to a table in Excel.

Before we begin, ensure your data is structured correctly. Subtotals are most effective when your data is sorted and organized by the columns you wish to subtotal. If your data isn't sorted, you can do so by using the 'Sort & Filter' function in Excel.

Inserting Subtotals

Once your data is sorted, the next step is to insert the subtotals. Excel offers a simple, automated process for this.

AD
Insert Subtotals to a Pivot Table | MyExcelOnline
Insert Subtotals to a Pivot Table | MyExcelOnline
How to Insert Subtotals in Excel: 7 Unique Methods - ExcelDemy
How to Insert Subtotals in Excel: 7 Unique Methods - ExcelDemy
How Do I Use Subtotals and Totals in an Excel Spreadsheet? | Techwalla
How Do I Use Subtotals and Totals in an Excel Spreadsheet? | Techwalla

Begin by selecting the entire data range, including the headers. Then, navigate to the '@Data' tab in the Excel ribbon. Look for the 'Outline' section, and click on 'Subtotal'. This will open the 'Subtotal' dialog box.

Choosing the Subtotal Location

The first decision you need to make in the 'Subtotal' dialog box is where you want the subtotals to appear. This is determined by the 'At each change in:' dropdown. Select the column you wish to subtotal by. For instance, if your data is sorted by 'Region', choose 'Region' from the dropdown.

Excel SUBTOTAL Function – Calculate Filtered Data Easily
Excel SUBTOTAL Function – Calculate Filtered Data Easily
an excel table with the text add borders to multiple tables in excel like a pro
an excel table with the text add borders to multiple tables in excel like a pro
How to Sort Subtotals in Excel (with Quick Steps) - ExcelDemy
How to Sort Subtotals in Excel (with Quick Steps) - ExcelDemy

Below the dropdown, you'll see a preview of how the subtotals will look. If you're not satisfied with the default '.Database' setting, you can change it to 'Pages' to show subtotals on their own page, or 'Outline' to display a list of outlines.

Selecting Functions and Customizing Options

Next, decide on the function for your subtotal. Most often, this will be 'Sum' if you're calculating total values. However, Excel offers other functions like 'Average', 'Count', 'Max', and 'Min', among others. You can also choose 'Custom' to enter a formula of your own.

AD

Below these options, you'll find checkboxes for adding or removing subtotals. 'Page-breaks' and 'Replace current subtotals' can be useful, but they're usually not needed. 'Remove all other details' is a helpful option if you only want to see the subtotals and not the individual data points.

How to Use Subtotal in Excel - Tutorial
How to Use Subtotal in Excel - Tutorial
How to create a compact table view in Excel!
How to create a compact table view in Excel!
How to Create an Excel Table With Ctrl + T
How to Create an Excel Table With Ctrl + T
Add or Subtract Multiple Cells in Excel
Add or Subtract Multiple Cells in Excel
an excel subtotal form is shown in green and white, with the numbers below it
an excel subtotal form is shown in green and white, with the numbers below it
How to Use the SUBTOTAL Function in Excel šŸ’”
How to Use the SUBTOTAL Function in Excel šŸ’”

Once you've made your selections, click 'OK'. Excel will automatically insert the subtotals into your table.

Removing and Customizing Subtotals

If you've inserted subtotals and decide you don't need them after all, you can remove them just as easily. To do so, click anywhere in the subtotal row, then go to the '@Data' tab and click on 'Subtotal' in the 'Outline' section. In the 'Subtotal' dialog box, click 'Remove All'.

AD

If you need more control over your subtotals, consider creating them manually. This is useful when you want to subtotal multiple columns, replace one set of subtotals with another, or perform more complex operations. To do this, use the SUBTOTAL function in Excel. For example, if you wanted to subtotal column A and column B, you would enter '=SUBTOTAL(9,H2:H5),SUBTOTAL(9,I2:I5)' in the cell where you want the subtotal to appear.

How to Calculate Subtotals in Excel - A Complete Guide - ExcelDemy
How to Calculate Subtotals in Excel - A Complete Guide - ExcelDemy
SUBTOTAL Function
SUBTOTAL Function
50 Things You Can Do With Excel Pivot Table | MyExcelOnline
50 Things You Can Do With Excel Pivot Table | MyExcelOnline

Subtotals are a powerful tool in Excel that can greatly simplify data analysis. By following these steps, you can easily add, remove, and customize subtotals to suit your needs.

Remember, organizing your data and inserting subtotals is just the beginning. Once you've added subtotals, you can use them to create charts, databases, or even pivot tables for even more advanced analysis. Happy Exceling!

AD
AD