SUBTOTAL Google Sheet Formula
Generate Google Sheet SUBTOTAL Formulas in seconds
Interactive Formula Generator
Formula Generator
Create complex Google Sheets formulas with natural language. Simply describe what you want to calculate.
Upgrade to Sheet Alchemy Pro
Get advanced formulas, batch processing, and priority support
Input
Result
Your formula will be displayed here:
Your formula will appear here
Describe what you want to calculate and click Generate
Pro Features Available
Sheet Alchemy Pro includes additional advanced features to enhance your formula generation.
Advanced Formulas
Complex array formulas and dynamic ranges
Batch Processing
Generate multiple formulas at once
Unlimited History
Save and organize all your formulas
SUBTOTAL Formula Syntax
Example Use Case
Calculating aggregates (sum, average, etc.) while ignoring filtered rows
Understanding the SUBTOTAL Formula
The SUBTOTAL function in Excel performs aggregate calculations (like sum, average, count) on a range, smartly ignoring rows hidden by filters. It’s a dynamic tool for data analysis, adapting to visible data in tables or lists.
SUBTOTAL(9, A1:A10) sums A1:A10, with 9 indicating SUM, skipping filtered-out values. It uses a function number (1-11 or 101-111) and a range, offering versatility—101-111 versions also ignore manually hidden rows.
Why Use SUBTOTAL?
SUBTOTAL shines in filtered datasets—think sales reports or inventory totals. Its filter-awareness and multi-function capability (sum, avg, etc.) make it a flexible choice for responsive summaries.
Example with Sample Data
| Range, Function | Formula | Result |
|---|---|---|
| 1,2,3,4 (Sum) | =SUBTOTAL(9, A1:A4) | 10 |
| 1,2,3,4 (Avg) | =SUBTOTAL(1, A1:A4) | 2.5 |
| 5,6,7 (Count) | =SUBTOTAL(2, A1:A3) | 3 |
SUBTOTAL adapts: sums to 10, averages to 2.5. It’s a filter-friendly aggregator.
Explore More Google Sheet Formulas
MINUTE
Extracting the minute component from a time value
Learn moreEVEN
Rounding a number up to the nearest even integer for pairing or batching
Learn moreRANDBETWEEN
Generating a random integer between two values for discrete sampling
Learn moreROUNDUP
Rounding a number up to a specified decimal place for generous estimates
Learn moreYEARFRAC
Calculating the fraction of a year between two dates
Learn moreLN
Calculating the natural logarithm for growth or decay analysis
Learn moreSUMPRODUCT
Multiplying and summing arrays for weighted totals or dot products
Learn moreCUMPRINC
Calculating cumulative principal paid on a loan between two periods
Learn moreUnlock the Full Power of Sheet Alchemy
Get access to all our formula generators, script generators, and conversion tools with a free Sheet Alchemy account.
