Google Sheets SUBTOTAL Function

This post will guide you how to use Google Sheets SUBTOTAL function with syntax and examples in Google Spreadsheet.

Description

The Google Sheets SUBTOTAL function returns the subtotal of the numbers in a list or database.

The SUBTOTAL function is a build-in function in Google Sheets and it is categorized as a Math and Trigonometry Function.

Syntax

The syntax of the SUBTOTAL function is as below:

= SUBTOTAL(function_num, ref1, [ref2])

Where the SUBTOTAL function argument is:

  • Function_num – This is a required argument.  It can be set as 1-11 or 101-111 for the subtotal.  1-11 that includes hidden rows and 101-111 excludes hidden rows.
Function_num
(includes hidden values)
Function_num
(ignores hidden values)
Function
1 101 AVERAGE
2 102 COUNT
3 103 COUNTA
4 104 MAX
5 105 MIN
6 106 PRODUCT
7 107 STDEV
8 108 STDEVP
9 109 SUM
10 110 VAR
11 111 VARP

 

Ref1– This is a required argument. The first named range or reference that you want to subtotal.

Google Sheets SUBTOTAL Function Example

the below examples will show you how to use Google Sheets SUBTOTAL function to return the subtotal of the numbers in a list.

#1 =SUBTOTAL(103,B:B)

google sheets SUBTOTAL Function1

Note: the above formula will call COUNTA function to count the number of cells(B:B) that contain numbers. It will return value 5.

#2 =SUBTOTAL(109,B:B)

google sheets SUBTOTAL Function2

Note: the above Google Sheets formula will call SUM function to add all numbers in range cell B:B, so it will return value: 160.

See Also:

Calculate The Average Of The Last 3, 5, Or N Numeric Values In Google Sheets

Related Posts

Calculate The Average Of The Last 3, 5, Or N Numeric Values In Google Sheets
Average the last 3_ 5 or N numeric values in google sheets1

As an Google sheets user, you might have come across a task in which you need to calculate the average values of the last 2 numeric values, and you might have done this task manually but suppose if the last ...

Google Sheets MOD Function
google sheets MOD function1

This post will guide you how to use Google Sheets MOD function with syntax and examples in Google Spreadsheets. Description The Google Sheets MOD function returns the remainder of two numbers after division. So you can use the MOD function ...

Google Sheets COUNTIFS Function
google sheets COUNTIFS function1

This post will teach you how to use Google Sheets COUNTIFS function with syntax and examples in Google Spreadsheets. Description The Google Sheets COUNTIFS function returns the count of cells in a range that meet one or more criteria. It ...

Google Sheets POWER function
google sheets POWER function1

This post will guide you how to use Google Sheets POWER function with syntax and examples in Google Spreadsheets. Description The Google Sheets POWER function returns the result of a number raised to a given power. So you can use ...

Google Sheets PI function
google sheets PI function1

This post will guide you how to use Google Sheets PI function with syntax and examples in Google Spreadsheets. Description The Google Sheets PI function returns the value of mathematical constant PI. The returned value is 3.14159265358979 and ti will ...

Google Sheets LN Function
google sheets LN function1

This post will guide you how to use Google Sheets LN function with syntax and examples. Description The Google Sheets LN function returns the natural logarithm of a given number.  And the natural logarithms are based on the constant e ...

Google Sheets INT Function
google sheets int function1

This post will guide you how to use Google Sheets INT function with syntax and examples. Description The Google Sheets INT function returns the integer portion of a given number. And it will round a given number down to the ...

Google Sheets FLOOR Function
google sheets floor function1

This post will guide you how to use Google Sheets FLOOR function with syntax and examples. Description The Google Sheets FLOOR function returns a number rounded down to the nearest multiple of significance. So it will return a rounded number. ...

Google Sheets EXP Function
google sheets exp function1

This post will guide you how to use Google Sheets EXP function with syntax and examples. Description The Google Sheets EXP function returns e raised to the power of a number.  The constant e is equal to 2.71828182845904, and it ...

Google Sheets FACT Function
google sheets FACT function1

This post will guide you how to use Google Sheets FACT function with syntax and examples. Description The Google Sheets FACT function returns the factorial of a given number.  The factorial of a given number is equal to 1*2*3…* number. ...

Sidebar