Excel's Subtotal feature enters formulas with the SUBTOTAL function in sorted database lists. The SUBTOTAL function (Figure 44) returns a subtotal for a sorted list. It uses the following syntax:
The function_num argument is a number that specifies which function to use. Table 3 shows the valid values. (I tell you about most of these functions in Chapter 5.) The ref argument is the range of cells to subtotal.
Sort the list by the field(s) for which you want subtotals (Figure 43) and select any cell in the list.
Choose Data > Subtotals (Figure 9) to display ...