Excel SUBTOTAL Function
Syntax
What is the SUBTOTAL function?
SUBTOTAL is a powerful Excel function that calculates aggregates (sum, average, count, etc.) while respecting filtered rows. Unlike SUM or AVERAGE which include hidden rows, SUBTOTAL automatically excludes filtered-out rows.
SUBTOTAL Syntax
=SUBTOTAL(function_num; ref1; [ref2]; ...)
- function_num 1-11: Excludes filtered rows only (manual hidden rows still counted)
- function_num 101-111: Excludes both filtered and manually hidden rows (recommended)
Function Numbers
1=AVERAGE, 2=COUNT, 3=COUNTA, 4=MAX, 5=MIN, 6=PRODUCT, 7=STDEV, 8=STDEVP, 9=SUM, 10=VAR, 11=VARP
Common Use Cases
Filterable dashboards, dynamic reports with drill-down, lists with subtotals row, lightweight pivot table alternatives.
Examples
| # | Title | Formula | Result |
|---|---|---|---|
| 1 | Filtreli toplam | =ALTTOPLAM(9;B:B) |
Görünen B kolonu toplamı |
| 2 | Filtreli + gizli (hepsi) | =ALTTOPLAM(109;B:B) |
Sadece görünen toplam (101-111) |
| 3 | Görünen satır sayısı | =ALTTOPLAM(103;A:A) |
Boş olmayan görünen kayıt |
| 4 | Filtreli ortalama | =ALTTOPLAM(101;C:C) |
Görünen kayıtların ortalaması |
| 5 | Filtreli maksimum | =ALTTOPLAM(104;D:D) |
Görünen kayıtların en büyüğü |
| 6 | Filtreli minimum | =ALTTOPLAM(105;D:D) |
Görünen kayıtların en küçüğü |
| 7 | Filtreli standart sapma | =ALTTOPLAM(107;E:E) |
Görünen kayıtların STDSAPMA'sı |
| 8 | İç içe — atlama | =ALTTOPLAM(9;A:A)+ALTTOPLAM(9;A:A) |
İç ALTTOPLAM atlanır, mükerrer yok |
Common Errors
Solution: 101-111'e geç
Solution: Sadece 1-11 veya 101-111 kullan
Solution: Sayım istiyorsan 3 veya 103 kullan
Solution: PivotTable kendi alt toplamı yapar
Frequently Asked Questions
Enter your email to receive the example Excel file (link valid 24h).