Aggregate functions are the backbone of reporting—always confirm whether Excel is counting numbers only or including text.
Functions
=SUM(B2:B100)
=AVERAGE(B2:B100)
=COUNT(B2:B100) ' numbers only
=COUNTA(B2:B100) ' non-empty cells
=MIN(B2:B100)
=MAX(B2:B100)
AutoSum
Alt+= inserts SUM for adjacent range.
SUBTOTAL
=SUBTOTAL(9, range) ignores rows hidden by filter—useful in filtered tables.
Important interview questions and answers
- Q: COUNT vs COUNTA?
A: COUNT counts numbers; COUNTA counts non-empty. - Q: SUBTOTAL?
A: Respects filtered rows.
Self-check
- Difference COUNT vs COUNTA?
- When use SUBTOTAL?
Pitfall: SUM skipping text numbers—clean data types first.
Interview prep
- COUNT vs COUNTA?
COUNT numbers only; COUNTA any non-empty cell.