What it does
AGGREGATE can summarize data while ignoring errors, hidden rows or nested subtotals.
Syntax or pattern
=AGGREGATE(function_num, options, array, [k])5 practical examples
Largest value ignoring errors
Return the largest valid number.
=AGGREGATE(14,6,B2:B100,1)Function 14 is LARGE, option 6 ignores errors.
Smallest value ignoring errors
Return the smallest valid number.
=AGGREGATE(15,6,B2:B100,1)Useful with messy calculated data.
Average ignoring errors
Average a range that may contain errors.
=AGGREGATE(1,6,B2:B100)Function 1 is AVERAGE.
Sum ignoring hidden rows
Sum while ignoring hidden rows and errors.
=AGGREGATE(9,7,B2:B100)Options change what is ignored.
Second largest value
Return the second largest value ignoring errors.
=AGGREGATE(14,6,B2:B100,2)The final argument is k for LARGE/SMALL functions.
Common mistakes to avoid
- Selecting ranges with different sizes.
- Using text values where numbers are required.
- Forgetting how blanks and hidden rows are treated.
Related Excel examples
FAQ
Can this formula use Excel Tables?
Yes. Structured references often make summary formulas easier to read.