Functions
Imagine you want to add up five cells: =B2+B3+B4+B5+B6. That works, but with twenty cells it would be boring. That’s why there are functions. They’re ready-made calculations with a name.
A function has a name and brackets. Inside the brackets, you write which cells it should calculate with. Like B2:B6, which means the cells from B2 to B6.
| What | Formula |
|---|---|
| Sum | =SUM(B2:B6) |
| Average | =AVERAGE(B2:B6) |
In Google Sheets and in English Excel, the functions have the same English names. If a function doesn’t work and shows the error #NAME?, check it for a typo.
On paper first
Your grades are 2, 1, 3, 2, 1.
- Sum: 2 + 1 + 3 + 2 + 1 = 9
- Average: 9 ÷ 5 = 1.8
That way, you’ll know whether the spreadsheet is calculating correctly.
The grade average
-
On the
Gradessheet, click on B8 (next to the wordAverage). -
Type
=AVERAGE(and select B2 to B6 with the mouse. Then type)and press Enter. -
You’ll see 1.8.
-
Change your Spanish grade (B4) from 3 to 1. The average changes to 1.4. Then change it back to 3.
The range must contain only the grades. Not the heading, and not the cell with the average. If you typed =AVERAGE(B2:B8) into B8, the formula would be calculating with itself and would show an error.
Adding up pocket money
On the Money sheet, you’ll add up how much you got this week.
-
In A10, type
Total in. -
In B10, type
=SUM(B2:B8). You’ll see 100. -
In A11, type
Total spent, and in B11,=SUM(C2:C8). You’ll see 75.
When something doesn’t add up
#NAME?: a typo in the function name.- The average is 9: you used SUM instead of AVERAGE.
- The average didn’t change when you changed a grade: the range doesn’t include that cell.
Giliranmu 💪
- B8 on
Gradesshows the average, 1.8. - When you change a grade, the average changes.
- On
Money, B10 and B11 show sums.
Done when: the spreadsheet works out the grade average and the pocket money sum by itself.
What to take away from this lesson
- Function = a ready-made calculation with a name.
- SUM adds up, AVERAGE works out the average.
B2:B6= the cells from B2 to B6.- A formula must not calculate with itself.
© 2026 Ing. Martin Polak / AlgoRhino · Ketentuan penggunaan konten