Excel Agility: Six Ways to Sum
Notice: No webinar is currently available in this series.
This webinar is not currently available, new dates coming soon.
Frequently Asked Questions
TRUE
The SUBTOTAL function calculates aggregations—including sum, average, count, and more—that automatically exclude hidden rows. This makes it the correct choice when your data is filtered with AutoFilter, as SUM would include the values in hidden filtered rows in its result while SUBTOTAL only processes the visible rows. SUBTOTAL's syntax is =SUBTOTAL(function_num, range), where the function_num determines the operation: 9 for sum, 1 for average, 2 for count, and so on. When using numbers 101-111 instead of 1-11, SUBTOTAL also ignores rows hidden manually (not just by filter). This is valuable in reports where you manually hide rows for presentation but still want accurate totals of visible data. SUBTOTAL also ignores other SUBTOTAL values within its range, preventing double-counting when you have SUBTOTAL formulas in both detail rows and summary rows. This self-exclusion property makes SUBTOTAL ideal for hierarchical financial reports with subtotals at multiple levels. For interactive dashboards where users filter data via AutoFilter or Table dropdowns, replacing SUM with SUBTOTAL ensures totals in summary rows always reflect the currently displayed data rather than the hidden full dataset.
The AGGREGATE function, introduced in Excel 2010, is an enhanced version of SUBTOTAL that offers two significant improvements: a wider range of functions (19 operations versus SUBTOTAL's 11) and the ability to ignore error values, hidden rows, or nested AGGREGATE/SUBTOTAL results in any combination. Its syntax is =AGGREGATE(function_num, options, array, ...). The options argument controls what is excluded: 1 ignores hidden rows, 2 ignores errors, 3 ignores both, 5 ignores hidden rows only, and so on. This makes AGGREGATE invaluable when you need to sum a range that may contain #N/A or #DIV/0! errors without wrapping every source formula in IFERROR. AGGREGATE also supports LARGE, SMALL, PERCENTILE, QUARTILE, and RANK—functions not available in SUBTOTAL. For example, =AGGREGATE(14,6,A1:A100,1) returns the largest value in the range while ignoring errors—something no other single function achieves cleanly. In financial models or data analyses where source ranges may contain formula errors that are acceptable but should not affect aggregate calculations, AGGREGATE is the most robust single-function solution available in Excel without dynamic array capabilities.
SUMPRODUCT can replicate—and often surpass—SUMIFS functionality for conditional aggregation, particularly when conditions involve calculations rather than simple value matches. While SUMIFS evaluates multiple equality conditions, SUMPRODUCT supports any logical expression as a filter: =(A2:A100>0)*(B2:B100<>"Excluded")*C2:C100 sums column C where column A is positive and column B is not Excluded. SUMPRODUCT multiplies arrays element-by-element: TRUE/FALSE arrays from conditions become 1/0, and multiplying by the value array produces conditional sums. For cases where conditions involve other functions—like checking if a date falls in a specific month using MONTH(D2:D100)=3—SUMPRODUCT handles this naturally while SUMIFS cannot. SUMPRODUCT also works in all Excel versions including those without SUMIFS, and it doesn't require Ctrl+Shift+Enter as a legacy array formula. The trade-off is performance: SUMPRODUCT evaluates every element in every array on every recalculation, making it slower than SUMIFS on very large ranges. For most business datasets under 100,000 rows, this performance difference is negligible. For highly complex multi-condition aggregations, SUMPRODUCT remains one of Excel's most flexible and powerful tools.
Pivot tables are arguably the most efficient way to produce conditional sums across large datasets—without writing a single formula. Where SUMIFS requires a separate formula for every combination of conditions you want to analyze, a pivot table produces all combinations simultaneously by dragging fields into the row, column, and values areas. For example, placing Region in rows, Quarter in columns, and Sales Amount in values creates a complete matrix of regional quarterly totals in seconds. The pivot table updates with a single Refresh when source data changes. Show Values As > % of Grand Total adds percentage columns without any formula. The Top 10 Value Filter highlights the highest-performing categories automatically. For ad-hoc analysis where you don't know in advance which aggregations you'll need, pivot tables are far more flexible than pre-built SUMIFS formulas. However, for fixed-format reports that must feed specific cells in a template—such as a financial statement where each line item has a defined cell address—SUMIFS provides more predictable, formula-driven control. The two approaches complement each other: pivot tables for exploration, SUMIFS for hardwired reporting templates. Both are essential Excel skills for business professionals.