5.3 Subtotals & Grand Totals

Learning Objectives

  • Subtotaling.
  • Display levels.
  • Hiding and expanding subtotaled data.

 

Subtotaling

You can automatically calculate subtotals and grand totals in a table for a column. This is a powerful tool that allows you to quickly display multiple levels of summary data within your table. This can provide Management with a report of higher level summary data one minute, and then can be easily switched back to detailed data the next minute. It is important to save often during this process and follow the steps carefully. It is recommended that you make a copy of the data you want to subtotal and place it in a new sheet, so that you can save the summary subtotaled data separately if desired.

In order to subtotal successfully, you always need to do the following in order:

  1. Sort by the column you want to subtotal on.
  2. Convert the table back to a normal Excel range. You cannot subtotal inside a table.
  3. Subtotal in the Data tab in the ribbon.
  4. If you want to limit your displayed data further, Filter in the Data tab in the ribbon.

We want to find out what the weather looks like for each day of the week, so we’ll need to save our data to a new sheet, sort by the days of the week, and then convert the table in order to get ready to see the subtotal.

  1. Click on the Weekly OR sheet.
  2. Point at the Weekly OR sheet tab at the bottom of the screen, hold the CTRL key down, and left-drag the sheet to the right until you are past all the existing sheets.
  3. When you see a sheet icon with a + sign, let go of the mouse button and then the CTRL key. A Weekly OR (2) sheet will appear.
  4. Right-click on the new Sheet tab, select Rename, type Subtotal OR, and then press ENTER.
  5. Save your file before you start Subtotaling!
  6. Remove all filters in the table by clicking the Data tab and then choosing Clear.
  7. Now we want to Sort the table by the Day column using a Custom Sort in the Sort button in the ribbon to sort in the order Sunday, Monday, Tuesday, etc. (See Figure 5.13 through 5.15 for a review of Custom Sorting.)
  8. Before you can subtotal, you must convert your table back to a regular range. To do this, click Convert to Range in the Table Tools Design tab on the ribbon. (See Figure 5.23)
    Figure 5.23 Convert to Range
  9. When asked if you want to convert the table, click Yes.
  10. Because your data is no longer formatted as a table, your slicer will disappear; and you will no longer have access to the Table Tools Design tab in the ribbon.
  11. Under the Data tab in the ribbon, click Subtotal.
  12. In the Subtotal Window, make the choices shown in the Figure 5.24. It is essential that you select the column you sorted by in the “At each change in” field at the top of the window. Click OK.
Subtotal window open to "At each change in" with "Day" entered. Use function: Average. Add subtotal to: High, Low, Rain & Snow boxes checked. Boxes checked for Replace current subtotals, and Summary below data.
Figure 5.24 Subtotal Window

Your data should look like Figure 5.25. Successful subtotaling shows only one subtotal for each group in the column you sorted by. (HINT: If you end up with more than one Subtotal for the same group (i.e – one of the days of the week in our example), you did not sort before subtotaling. Remove your subtotals using the Remove All button in Figure 5.24, sort your table, and then try subtotaling again.)

 

1,2,3 Outline buttons in upper left corner circled in blue. A11 "Sunday Average" bold, black, and subtotal data for High (°F) 46.9, Low (°F) 35.0, Rain 0.19, and Snow 0.00. A17 "Monday Average" bold, black, and subtotal data for High (°F) 47.0, Low (°F) 35.8, Rain 0.16, and Snow 0.04.
Figure 5.25 Subtotal Results

Notice the three Outline buttons circled in the upper-left corner of the spreadsheet. These allow you to control the amount of subtotaled data that is displayed. Table 5.5 describes the different Outline buttons.

Table 5.5 Subtotal Outline Buttons

Button Content Displayed
Level 1 Only grand total

 

Level 2 Subtotals and grand total

 

Level 3 Individual records, subtotals, and grand total

Let’s try the three Outline buttons to see the difference in the data displayed:

  1. Click on the 1 Outline button in the upper left-hand corner of the sheet.
  2. You should see only the Grand Average row with averages for High, Low, Rain, and Snow.
  3. Click on the 2 Outline button.
  4. Now you’ll see the average for each day of the week along with the Grand Average.
  5. Click on the + Sign button to the left of the Sunday Average row.
  6. This expands just the Sunday Day data and displays the individual records for this subset of the data. Clicking on + Sign buttons will expand a portion of the data at a time. Clicking on – Sign buttons hide a portion of the data at a time.
  7. Click on the 3 Outline button.
  8. All the individual records along with the subtotals, and Grand Average should be displayed.
  9. Save your Excel file.

Key Takeaways

  • Filtering is an easy way to see a subset of your data. Filtering arrows appear to the right of each column heading when you insert a table with a header row.
  • You can filter by text or numerically.
  • A slicer is another way to filter in Excel that provides a set of filtering buttons on your sheet.
  • Adding a total row to a table is a quick, efficient way to see summary statistics for one or more columns in a table.
  • Subtotaling provides a way to quickly add totals to groups within a column along with providing a grand total at the bottom of the table.
  • Subtotal Outline buttons allow users to see add of the subtotaled data, just the totals and grand total, or simply the grand total.
  • Plus and minus buttons within subtotaling allow a user to expand and hide portions of the subtotaled data.

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Business Computer Information Systems Copyright © 2020 by Emese Felvegi; Barbara Lave; Diane Shingledecker; Julie Romey; Noreen Brown; Mary Schatz; OpenStax; Saylor Academy; University of Minnesota Libraries; and Robert McCarn is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.