## You are learning The Excel Interface

How do I use the SUM function to add values?

The SUM function in Excel is a workhorse for quickly adding up numerical values in a range of cells. Here's how to use it:

Basic Syntax:

```excel

=SUM(range)

```

- =SUM( is the beginning part of the formula, letting Excel know you want to use the SUM function.

- range is the part that tells the function which cells to add. This can be a cell reference for a single cell, a range of cells (written as A1:A10), or even a named range (if you've previously defined one).

Examples:

1. Adding values in cells A1 and A2:

```excel

=SUM(A1:A2)

```

This formula will add the values in cells A1 and A2 and display the result in the cell where you entered the formula.

2. Adding values in a larger range:

```excel

=SUM(B3:B15)

```

This formula will add all the values from cell B3 down to cell B15 (inclusive).

3. Adding values in non-contiguous cells:

While SUM normally works with continuous ranges, you can also add values in separate locations using commas to separate the cell references. For example:

```excel

=SUM(A1, C3, E5)

```

This formula will add the value in cell A1, then the value in C3, and finally the value in E5 and display the combined total.

Additional Notes:

- The SUM function can handle numbers, currency values, and even date values (which are internally stored as numbers in Excel).

- If a cell reference within the range includes text or errors (e.g., #VALUE!), the SUM function will ignore that cell and continue adding the remaining numerical values.

- For more complex addition scenarios, Excel offers other functions like SUMIF, SUMIFS, and SUMPRODUCT that can add based on specific criteria.

By mastering the SUM function, you can save time and effort when working with numerical data in Excel.