SUBTOTAL
The Formualizer engine in this repository at 0.14.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=SUBTOTAL(function_num, ref1, [ref2], ...)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
function_num | number (range) | Required | — |
ref1 | number (range) | Required | — |
ref2 | number (range) | Optional | — |
Accepts a variable number of arguments. Minimum: 2.
Examples
Select the sum operation over three source cells.
Formula =SUBTOTAL(9,A1:A3)
| A | |
|---|---|
| 1 | 5 |
| 2 | 10 |
| 3 | 20 |
Expected result 35
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Use operation one to calculate their average instead.
Formula =SUBTOTAL(1,A1:A3)
| A | |
|---|---|
| 1 | 5 |
| 2 | 10 |
| 3 | 20 |
Expected result 11.6666666666667
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Include a referenced nested SUBTOTAL to check how it contributes to the outer sum.
Formula =SUBTOTAL(9,A1:A3,B1)
| A | B | |
|---|---|---|
| 1 | 5 | =SUBTOTAL(9,A1:A2) |
| 2 | 10 | |
| 3 | 20 |
Expected result 35
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
An unsupported operation number cannot select a subtotal calculation.
Formula =SUBTOTAL(99,A1:A3)
| A | |
|---|---|
| 1 | 5 |
| 2 | 10 |
| 3 | 20 |
Expected result #VALUE!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.