Pepelen
← Google Sheets from Scratch: Formulas, QUERY, and Collaboration

Lesson

Lesson 2: SUM, AVERAGE, COUNT, COUNTA, MIN, MAX

Apply basic aggregate functions to a range to find the sum, the average, the count, and the smallest and largest values.

1 / 6

Aggregate functions: an overview

SUM, AVERAGE, COUNT, COUNTA, MIN, MAX

Functions are built-in “machines” that take a range of cells and return a single result. The syntax is always the same: =FUNCTION_NAME(range). For example, =SUM(B2:B10) adds up all the numbers from B2 to B10. Arguments are separated by a comma: =SUM(B2:B5, D2:D5). The main functions: • =SUM(range) — the sum of all the numbers in the range. • =AVERAGE(range) — the average (arithmetic mean) of the numbers. • =MIN(range) — the smallest value. • =MAX(range) — the largest value. • =COUNT(range) — counts only cells with numbers. • =COUNTA(range) — counts all non-empty cells (numbers, text, dates, and so on). The difference between COUNT and COUNTA matters in practice: if a “Grades” column contains “N/A” (text) and numbers, COUNT counts only the numeric grades, while COUNTA counts every filled row. Use COUNT when you need to know how many students got a numeric grade, and COUNTA when you need to know how many rows are filled at all.
Lesson notes
SUM, AVERAGE, COUNT, COUNTA, MIN, MAX
Functions are built-in “machines” that take a range of cells and return a single result. The syntax is always the same: =FUNCTION_NAME(range). For example, =SUM(B2:B10) adds up all the numbers from B2 to B10. Arguments are separated by a comma: =SUM(B2:B5, D2:D5). The main functions: • =SUM(range) — the sum of all the numbers in the range. • =AVERAGE(range) — the average (arithmetic mean) of the numbers. • =MIN(range) — the smallest value. • =MAX(range) — the largest value. • =COUNT(range) — counts only cells with numbers. • =COUNTA(range) — counts all non-empty cells (numbers, text, dates, and so on). The difference between COUNT and COUNTA matters in practice: if a “Grades” column contains “N/A” (text) and numbers, COUNT counts only the numeric grades, while COUNTA counts every filled row. Use COUNT when you need to know how many students got a numeric grade, and COUNTA when you need to know how many rows are filled at all.
Lesson 2: SUM, AVERAGE, COUNT, COUNTA, MIN, MAX — Google Sheets from Scratch: Formulas, QUERY, and Collaboration