Home Privacy Policy Feedback Link to us Site Map
Loading

MS Excel: Subtotal Function


In Excel, the Subtotal function returns the subtotal of the numbers in a column in a list or database.

The syntax for the Subtotal function is:

Subtotal( method, range1, range2, ... range_n )

method is type of subtotal that you'd like to create. It can be one of the following values:

Value Explanation
1 AVERAGE
2 COUNT
3 COUNTA
4 MAX
5 MIN
6 PRODUCT
7 STDEV
8 STDEVP
9 SUM
10 VAR
11 VARP

range1, range2, ... range_n are the ranges of cells that you want to subtotal.

Applies To:

  • Excel 2007, Excel 2003, Excel XP, Excel 2000

For Example:

Let's take a look at an example:

Based on the Excel spreadsheet above:

=Subtotal(1, D2:D5) would return 22.3925
=Subtotal(2, D2:D5) would return 4
=Subtotal(3, D2:D5) would return 4
=Subtotal(4, D2:D5) would return 35.88
=Subtotal(5, D2:D5) would return 7
=Subtotal(6, D2:D5) would return 136191.51
=Subtotal(7, D2:D5) would return 11.91825316
=Subtotal(8, D2:D5) would return 10.32151
=Subtotal(9, D2:D5) would return 89.57
=Subtotal(10, D2:D5) would return 142.0447583
=Subtotal(11, D2:D5) would return 106.5335688