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: