Insert subtotals

Microsoft Office Excel 2003

Example of automatic subtotals

Callout 1 Column to subtotal

Callout 2 Subtotals

  1. Make sure the data you want to subtotal is in the following format: each column has a label in the first row and contains similar facts, and there are no blank rows or columns within the range.
  2. Click a cell in the column to subtotal. In the example above, you'd click a cell in the Sport column, column B.
  3. Click Sort Ascending Button image or Sort Descending Button image.
  4. On the Data menu, click Subtotals.
  5. In the At each change in box, click the column to subtotal. In the example above, you'd click the Sport column.
  6. In the Use function box, click the summary function you want to use to calculate the subtotals.
  7. In the Add subtotal to box, select the check box for each column that contains values you want to subtotal. In the example above, you'd select the Sales column.
  8. If you want an automatic page break after each subtotal, select the Page break between groups check box.
  9. If you want the subtotals to appear above the subtotaled rows instead of below, clear the Summary below data check box.
  10. Click OK.

Note  You can use the Subtotals command again to add more subtotals with different summary functions. To avoid overwriting the existing subtotals, clear the Replace current subtotals check box.

ShowTip

To display a summary of just the subtotals and grand totals, click the outline symbols one two three next to the row numbers. Use the plus and minus symbols to display or hide the detail rows for individual subtotals.

ShowInsert nested subtotals

Example of outer and nested subtotals

Callout 1 Outer subtotals

Callout 2 Nested subtotals

  1. Make sure the data you want to subtotal is in the following format: each column has a label in the first row and contains similar facts, and there are no blank rows or columns within the range.
  2. Sort the range by multiple columns, sorting first by the outer subtotal column, then by the next inner column for the nested subtotals, and so on. In the example above, you'd sort the range first by the Region column, and then by the Sport column.

    ShowHow?

    For best results, the range you sort should have column labels.

    1. Click a cell in the range you want to sort.
    2. On the Data menu, click Sort.
    3. In the Sort by and Then by boxes, click the columns you want to sort.
    4. Select any other sort options you want, and then click OK.
  3. Insert the outer subtotals.

    ShowHow?

    1. On the Data menu, click Subtotals.
    2. In the At each change in box, click the column for the outer subtotals. In the example above, you'd click Region.
    3. In the Use function box, click the summary function you want to use to calculate the subtotals.
    4. In the Add subtotal to box, select the check box for each column that contains values you want to subtotal. In the example above, that column would be Sales.
    5. If you want an automatic page break after each subtotal, select the Page break between groups check box.
    6. If you want the subtotals to appear above the subtotaled rows instead of below, clear the Summary below data check box.
  4. Insert the nested subtotals.

    ShowHow?

    1. On the Data menu, click Subtotals.
    2. In the At each change in box, click the nested subtotal column. In the example above, that column would be Sport.
    3. Select the summary function and other options.
    4. Clear the Replace current subtotals check box.
  5. Repeat the previous step for more nested subtotals, working from the outermost subtotals in.

ShowInsert a total row in a list

  1. Make sure that the list is active by selecting a cell in the list.
  2. Click Toggle Total Row Button image on the List toolbar.