Data Analytics Roadmap
Excel Basics → Basic Formulas → AGGREGATE Function
PHASE 01 · BASIC FORMULAS

Excel AGGREGATE Function

The Swiss Army Knife of Excel. Handles 19 functions, ignores #DIV/0! and #N/A errors, and calculates filtered data seamlessly.

⏱ ~15 Minutes📊 Data Analytics🎮 Interactive Error Bypass Simulator

The Big Problem: Why Standard SUM & SUBTOTAL Break

In real-world data analysis, datasets are rarely clean. Formulas like VLOOKUP or division calculations often leave #N/A or #DIV/0! error cells.

❌ STANDARD =SUM() & =SUBTOTAL()

Formula Crash (#DIV/0!)

If even ONE single cell in your range contains #DIV/0! or #N/A, standard SUM and SUBTOTAL immediately crash and return an error!

✅ =AGGREGATE(9, 6, Range)

Gracefully Bypasses Errors

AGGREGATE ignores all error cells and calculates the exact total of valid numbers without breaking your dashboard.

Formula Syntax & Dual Forms

AGGREGATE comes in two flexible forms depending on the function type:

Form 1: Reference Form (for SUM, AVERAGE, MAX, MIN...)=AGGREGATE(function_num, options, ref1, [ref2], ...)
Form 2: Array Form (for LARGE, SMALL, PERCENTILE...)=AGGREGATE(function_num, options, array, k)

Interactive Error Bypass Simulator

The dataset below contains intentional #DIV/0! and #N/A errors. Select different options to see how AGGREGATE saves your report!

Standard =SUM(Sales)#DIV/0!❌ Crashes due to error cells
=SUBTOTAL(9, Sales)#DIV/0!❌ Crashes due to error cells
=AGGREGATE(9, 6, Sales)$3,250✅ Bypasses errors seamlessly!
Cell LabelCategoryCell ValueEvaluation Status
MacBook Pro SalesHardware$1800✅ Included in Calculation
Division Margin DiscountSoftware#DIV/0!🛡️ Ignored by Option 6
4K Monitor SalesHardware$650✅ Included in Calculation
Missing Inventory StockHardware#N/A🛡️ Ignored by Option 6
Wireless Mouse SalesHardware$150✅ Included in Calculation
Corrupted Currency CellOther#VALUE!🛡️ Ignored by Option 6
Standing Desk SalesFurniture$400✅ Included in Calculation
Ergonomic Chair SalesFurniture$250✅ Included in Calculation

19 Supported Functions List

AGGREGATE supports 19 calculation functions — far more than SUBTOTAL!

#1AVERAGERef
#2COUNTRef
#3COUNTARef
#4MAXRef
#5MINRef
#6PRODUCTRef
#7STDEV.SRef
#8STDEV.PRef
#9SUMRef
#10VAR.SRef
#11VAR.PRef
#12MEDIANRef
#13MODE.SNGLRef
#14LARGEArray (requires k)
#15SMALLArray (requires k)
#16PERCENTILE.INCArray (requires k)
#17QUARTILE.INCArray (requires k)
#18PERCENTILE.EXCArray (requires k)
#19QUARTILE.EXCArray (requires k)

Options Codes Reference Table (0 to 7)

Option CodeWhat it IgnoresBest Used For
Option 0Ignore nested SUBTOTAL and AGGREGATE functionsStandard Option
Option 1Ignore hidden rows, nested SUBTOTAL and AGGREGATEStandard Option
Option 2Ignore error values, nested SUBTOTAL and AGGREGATEStandard Option
Option 3Ignore hidden rows, error values, nested SUBTOTAL and AGGREGATE⭐ Best for Filtered & Error Tables
Option 4Ignore nothing (Standard calculation)Standard (Ignores nothing)
Option 5Ignore hidden rows onlyStandard Option
Option 6Ignore error values only (MOST POPULAR!)⭐ Most Popular for Error Bypass
Option 7Ignore hidden rows and error valuesStandard Option

🧪 Knowledge Check — AGGREGATE Quiz

Question 1 of 5Score: 0

💥 A column contains numbers mixed with #DIV/0! and #N/A errors. What does standard =SUM(A1:A10) return?