- What's the difference between AGGREGATE(9,...) and SUM()?
- SUM ignores text and logical values but fails on errors (#DIV/0!, #N/A); AGGREGATE can be configured to skip errors entirely (options 2, 3, 6, or 7). AGGREGATE also optionally ignores hidden rows and nested SUBTOTAL functions, making it safer for filtered or complex data.
- When should I use AGGREGATE instead of SUBTOTAL?
- Use SUBTOTAL for traditional subtotaled reports (it automatically excludes other SUBTOTAL results). Use AGGREGATE when your data contains errors or hidden rows that you want to skip, or when you need both error-handling and hidden-row filtering in one formula.
- How do I ignore both hidden rows and errors at the same time?
- Set options=7. This combines all three filters: bit 1 (ignore hidden rows) + bit 2 (ignore errors) + bit 4 (ignore SUBTOTAL results). For example, =AGGREGATE(9,7,A1:A100) sums A1:A100 while skipping hidden rows, error values, and nested SUBTOTALs.
- Can AGGREGATE handle multiple non-adjacent ranges?
- Not with a single ref argument. AGGREGATE requires contiguous ranges per ref. To sum multiple non-adjacent columns, nest multiple AGGREGATE calls in a SUM, or use multiple ref arguments if your data structure allows (e.g., =AGGREGATE(9,6,A:A,C:C) on some spreadsheets).