SUBTOTAL()

Syntax. SUBTOTAL(function_num,ref1,ref2, ...)

Definition. This function returns a subtotal in a list or database. It is usually easier to create a list with subtotals by using the Data/Subtotal command. After the subtotal list has been created, you can modify it with the SUBTOTAL() function.

Arguments

  • function_num (required) A number between 1 and 11 (including hidden values) or between 101 and 111 (ignoring hidden values) that specifies which function to use when calculating subtotals within a list. The possible values are shown in Table 16-6.

    Table 16-6. Possible Values for the function_num Argument

    Code for Unhidden Values

    Code for Hidden Values

    Function

    1

    101

    AVERAGE()

    2

    102

    COUNT()

    3

    103

    COUNTA()

    4

    104

    MAX()

    5

    105

    MIN()

    6

    106

    PRODUCT()

    7

    107

    STDEV() ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.