# Using Subtotals and Totals

There are many times you may need to have both subtotals and totals in the same column of data. The easiest solution would be to put subtotals and totals in different columns (like accountants often do), but this is not always practical for the data at hand. In these instances, there are three different approaches you can use.

The first approach is to place your various subtotals, as desired. Then, when it comes time to place your totals, simply use a modified SUM formula. For instance, if you want to get a total for the range F10:F32, and there are subtotals interspersed in the column, you would use this formula for your total:

```=SUM(F10:F32)/2
```

This works because the addition of the subtotals simply doubles the real value of the column. The second way is to use the familiar AutoSum feature of Excel, accessible in the Editing group on the Home tab of the ribbon. Insert your subtotals as normal in the column. When you are ready to add your total, select all the cells you want to total, as well as the cell where your total will appear. So if you want a total for the range B3:B20 (which includes some subtotals), and you want the total to appear in B21, select cells B3 through B21. Then click on the AutoSum tool. The total inserted by Excel in cell B21 is the sum of all the subtotals in the column.

If you are using a well-defined data table (headings, multiple columns, etc.), then you may also want to use the built-in subtotals feature of Excel. This works particularly well if you need subtotals based on a change in a particular column value. For instance, you may have a table that lists products in one column, quantities in another, and values in another. You can insert subtotals and totals for this table by following these steps:

1. Sort the table by the values in the Products column.
2. Display the Data tab of the ribbon.
3. Click the Subtotal tool in the Outline group. Excel displays the Subtotal dialog box. (See Figure 1.)
4. Figure 1. The Subtotal dialog box.

5. Make sure the At Each Change In drop-down list is set to Products. (This indicates where Excel will insert subtotals.)
6. The Use Function drop-down list should be set to Sum.
7. Using the list in the Add Subtotal To box, choose the columns to which subtotals should be added.
8. Make sure the Summary Below Data check box is selected. (This inserts the total you need.)
9. Click on OK.