SUBTOTAL

SUBTOTAL(function_num, ref1 [,ref2] [..])

Returns the choice of 11 different operations for numerical values (renamed).

function_numThe type of function to use:
1,101 = AVERAGE
2,102 = COUNT
3,103 = COUNTA
4,104 = MAX
5,105 = MIN
6,106 = PRODUCT
7,107 = STDEV.S
8,108 = STDEV.P
9,109 = SUM
10,110 = VAR.S
11,111 = VAR.P
ref1The first reference you want to subtotal.
ref2(Optional) The second reference.

REMARKS
* AGGREGATE was added in Excel 2010 to replace this function.
* This function is only available for backwards compatibility and should not be used.
* For an illustrated example refer to the page under Summing Functions
* This function excludes empty cells.
* Using the function numbers 1 to 11 will include hidden rows.
* Using the function numbers 101 to 111 will exclude hidden rows.
* Rows can be hidden using AutoFilter, Hide Rows, Grouping or Nested Subtotals
* Nested functions are typically used in conjunction with Grouping.
* If any of the references are 3D references, then #VALUE! is returned.
* You can have a maximum of 255 arguments.
* In Excel 2003 the function numbers 101 to 111 were added.
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 AB
1=SUBTOTAL(1, B1:B8) = 85
2=SUBTOTAL(2, B1:B8) = 410
3=SUBTOTAL(3, B1:B8) = 715
4=SUBTOTAL(4, B1:B8) = 15 
5=SUBTOTAL(5, B1:B8) = 00
6=SUBTOTAL(6, B1:B8) = 0text
7=SUBTOTAL(9, B1:B8) = 30True
8=SUBTOTAL(12, B1:B8) = #VALUE!False
9=SUBTOTAL(13, B1:B8) = #VALUE!=DATE(2024, 1, 1) = 01 Jan 2024
10=SUBTOTAL(9, B1, B2, B3, B4) = 30=10/0 = #DIV/0!
11=SUBTOTAL(6, B11:B11) = 0 
12=SUBTOTAL(7, B11:B11) = #DIV/0! 
13=SUBTOTAL(8, B11:B11) = #DIV/0! 
14=SUBTOTAL(9, B11:B11) = 0 
15=SUBTOTAL(10, B11:B11) = #DIV/0! 
16=SUBTOTAL(11, B11:B11) = #DIV/0! 
17=SUBTOTAL(11, B1, B3, B5, B7) = 39 
18=SUBTOTAL(111, B1:B6) = 31 
19=SUBTOTAL(12, B11:B11) = #VALUE! 


© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited Top