SUBTOTAL function
a subtotal in a list or database.
Math and trigonometry
Where can you use it?
Reporting, manufacturing and engineering teams. When a total, rounding step or numerical transformation is needed, use the example to see which operation fits your inputs.
Scenario in the workbook
Total a report section using operation code 9. Rows excluded by a filter are ignored.
A worked example from the workbook
| Row | A | B | C |
|---|---|---|---|
| 6 | Input | Comparison | Group |
| 7 | 2 | 3 | 4 |
| 8 | 1 | 2 | 3 |
| 9 | 0 | 0 | 0 |
Record 1
=SUBTOTAL(9,A7:C7)Expected result9
See the inputs and instructions for all 3 examplesCopyable formulas
English Excel · en-US
=SUBTOTAL(9,A7:C7)Turkish Excel · tr-TR
=ALTTOPLAM(9;A7:C7)Worked examples
Total a report section using operation code 9. Rows excluded by a filter are ignored.
Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.
| Row | A | B | C |
|---|---|---|---|
| 6 | Input | Comparison | Group |
| 7 | 2 | 3 | 4 |
| 8 | 1 | 2 | 3 |
| 9 | 0 | 0 | 0 |
| Case | Formula | Expected result |
|---|---|---|
| Record 1 | =SUBTOTAL(9,A7:C7) |
9 |
| Record 2 | =SUBTOTAL(9,A8:C8) |
6 |
| Record 3 | =SUBTOTAL(9,A9:C9) |
0 |