The SUM function operates very similar to a calculator summing numbers. Let's use the following list of numbers in a worksheet as an example:

If we were to use a calculator to add these numbers together, we'd do it like so:

However, if we were to use Excel to accomplish the same exact thing, we'd could do it like this:

Notice here, how we're using cell references instead of numbers. That's part of the power of Excel, it enables efficiency and "one source of truth". We'll get to that later, but for now, let's highlight the purpose behind the SUM function alone.

The SUM function takes a list of numbers and adds them together.

How to code a SUM

With the following code template...

=SUM(number1, [number2]...)

...we can sum our values by referencing each cell like so.

We can additionally find the sum of the list of values above by typing our SUM function and highlighting the cells like so:

SUMing 5 numbers in list

The ":" encapsulates all of the cells between the referenced cells on both sides of the ":".

In the case of A1:A5, we are highlighting all of the cells in between A1 and A5.

To test your understanding, what do you think A2:C5 would cover?

Visualizing the ":" functionality

All of the cells between A2 and C5!

If you're still confused, watch the GIF above and notice how the column/row values change in the second cell reference with each space I move.

However, what if one of the cells I wanted to include in the sum was not in the same column, like so?

All we'd need to do would be re-highlight my values while holding the Control button! (Mac users, hold the Command button).

SUMing 5 numbers not in list

To highlight multiple groupings of cells, hold down the Control button (for Mac users, hold down the Command button).