Excel SUBTOTAL function
Calculates a sum, average or count while skipping cells that already hold another SUBTOTAL. In Spanish Excel it is called SUBTOTALES.
Syntax
English Excel
=SUBTOTAL(function_num, ref1, [ref2], …)
Spanish Excel (Mexico)
=SUBTOTALES(núm_función, ref1, [ref2], …)
Spanish Excel (Spain, Latin America)
=SUBTOTALES(núm_función; ref1; [ref2]; …)
| Argument | What it is |
|---|---|
| function_num | 9 sum, 1 average, 2 count, 4 max, 5 min. |
| ref1 | The range to calculate. |
| ref2optional | More ranges. |
Example
SUBTOTAL(9, range) adds like SUM, but skips cells that already hold another SUBTOTAL. That way the grand total does not count the subtotals twice. 9 means sum; 1 is average and 4 is maximum.
=SUBTOTAL(9,C2:C3)
Common mistake
With 109 instead of 9 it also skips hidden or filtered rows.
About Ads
This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.
Ads help us keep WebHerramientas free for everyone
Practice SUBTOTAL
Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons
Totals without double counting: SUBTOTAL
SUBTOTAL(9, range) adds like SUM, but skips cells that already hold another SUBTOTAL. That way the grand total does not count the subtotals twice. 9 means sum; 1 is average and 4 is maximum.
In C4, add up North’s sales with SUBTOTAL.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Region | Salesperson | Sales | |
| 2 | North | Ana | 12,400.00 | |
| 3 | North | Luis | 8,300.00 | |
| 4 | North total | |||
| 5 | South | Sofía | 15,100.00 | |
| 6 | South | Diego | 7,600.00 | |
| 7 | South total | |||
| 8 | Grand total | |||
| 9 |
Tip: while typing, click a cell or drag across several to insert their reference. F4 anchors the reference with $.
Frequently asked questions
- What is SUBTOTAL called in Spanish?
- In Spanish Excel it is SUBTOTALES. The formula =SUBTOTAL(9,C2:C3) is written =SUBTOTALES(9;C2:C3) (or with commas in Mexico).
- Why does SUBTOTAL use semicolons in some Excel versions?
- It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
- What is the most common SUBTOTAL mistake?
- With 109 instead of 9 it also skips hidden or filtered rows.