Lesson 2: The first function

Now that we’ve seen how to include formulas in Excel spreadsheets, we can get to the real deal: functions. Functions are basically formulas with names. It’s easiest to understand with an example.

The SUM function will sum the values that you give it. We can recreate the formula that we created in the previous exercise (=32+57), but using the SUM function. That would look like this: =SUM(32,57)

If you write this in a cell, it will show 89. Exactly as you may expect. But you can add more numbers (separated by commas) to the function: =SUM(32,57,1) will result in 90, for example.


In this exercise, we will combine the SUM function with another interesting Excel feature: references. So what are references? Once again, an example will explain this very quickly. Look at the following formula: =SUM(A1,A2)

What do you think the result will be? It will be the value in cell A1 plus the value in cell A2. It’s that simple.

We know the SUM function will sum the values that you give it, but in this case, we give it references to cells. When you do that, it will instead sum the contents of the cells that you reference. So the result will be different depending on the values in cells A1 and A2.

These references can be super handy because they update automatically if the contents of the cells change. Whenever you edit the value in cell A1, the result of =SUM(A1, A2) will also automatically update! And that’s why references are so ridiculously useful.

Now, let’s get to the exercise. We will be using the SUM function to calculate our total monthly income after expenses. Use the SUM function in cell B7 to sum the values in the cells B2, B3, B4 and B5. That way, you will have calculated the total monthly income after expenses.

Spreadsheet editor

Good job!

If this was your first function, you can be extra proud of yourself.

We hope that wasn't too difficult. Or if it was a little difficult, that when you looked at the answer, it made sense.

Note about the answer: if you looked at the answer to the above exercise, you saw a notation that you may not have seen before. =SUM(B2:B5). The colon : is used to mean a cell range. In this case, that means cells B2 up to and including B5. So it is equivalent to using =SUM(B2,B3,B4,B5). In Excel, there are often multiple ways of solving the same problem. We'd encourage you to use the solution that is most intuitive to you.

Need some help?

You want to use references to the cells B2, B3, B4 and B5. Combine these references in the SUM function.

You need to fill in =SUM(References) in cell B7. Substitute the word References with the cell references, separated by commas.