Use the SUM function to add a range of numbers, a list of specific values, or a combination of both. You can type the formula manually or use the AutoSum button for the fastest result. This guide covers the basic syntax, manual entry, AutoSum, and how to handle errors like #VALUE! or #N/A.

What You'll Need

  • A computer running Microsoft Excel (2016, 2019, 2021, or Microsoft 365).
  • A dataset containing numbers in at least one column or row.
  • A keyboard and mouse (or trackpad) for input.

Step-by-Step

  1. Open your spreadsheet. Launch Excel and open the workbook containing the data you wish to sum. Ensure your numerical data is organized in a clear range, such as Column A or Row 1. For this example, imagine you have sales figures in cells A1 through A5.
  2. Locate the target cell. Click on the empty cell where you want the total to appear. This is often at the bottom of a column or the end of a row. In our example, we will select cell A6 to place the sum of A1:A5 there.
  3. Enter the SUM formula manually. Type an equals sign (=) to begin the formula, followed by the word SUM. Open a parenthesis ( and type the first cell reference (e.g., A1), add a colon :, and type the last cell reference (e.g., A5). Close the parenthesis ) and press Enter. The formula should look like =SUM(A1:A5).
  4. Sum non-contiguous ranges. To add numbers that are not next to each other, type the SUM function, open the parenthesis, and click the first cell. Add a comma , (not a colon) and click the next cell. Repeat for every cell you want to include. For example, =SUM(A1, A3, A5) adds only those specific cells.
  5. Use the AutoSum button. Select the cell immediately below a column of numbers (or to the right of a row). Go to the Home tab on the ribbon and click the AutoSum button (Σ icon) on the far right of the Editing group. Excel will automatically detect the range of numbers above the cursor and insert the SUM formula. Press Enter to confirm.
  6. Sum multiple columns simultaneously. If you want to sum entire columns, select the empty cell at the bottom of the first column, type =SUM(A:A), and press Enter. This will add every number in Column A, regardless of how many rows contain data. Repeat this for other columns as needed.
  7. Sum specific conditions (SUMIF). To add numbers only when they meet a condition (e.g., sales greater than $500), use the SUMIF function. The syntax is =SUMIF(range, criteria, [sum_range]). For example, =SUMIF(A1:A5, ">500") adds numbers in A1:A5 that are strictly greater than 500.
  8. Sum based on multiple criteria (SUMIFS). To add numbers based on multiple conditions, use SUMIFS. The syntax is =SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...). For example, =SUMIFS(B1:B5, A1:A5, ">500") looks at Column A for values over 500 and sums the corresponding values in Column B.

Common Mistakes

Incorrect Range Selection

A common error is including text data in the range. If a cell within the specified range contains text, the SUM formula will return a #VALUE! error. Always ensure the range (e.g., A1:A5) contains only numerical values or numeric-formatted text before summing.

Using Commas Instead of Colons

When entering a range of consecutive cells, you must use a colon : (e.g., A1:A5). Using a comma , tells Excel to treat those as separate arguments rather than a continuous range. For example, =SUM(A1, A5) will only add the values in A1 and A5, ignoring A2, A3, and A4.

Mismatched Parentheses

Every opening parenthesis ( must have a corresponding closing parenthesis ). If you forget one, Excel will highlight the formula in red and display an error message. Double-check your formula to ensure the start and end parentheses match perfectly.

Ignoring Hidden Rows

The standard SUM function adds all values in the specified range, even if those rows are hidden. If you need to sum only visible cells, you must use the AGGREGATE function (e.g., =AGGREGATE(9, 5, range)) or filter your data first.

Tips

Use Absolute References

When dragging a SUM formula across rows or columns, Excel will adjust the cell references automatically (e.g., A1 becomes A2). If you want to keep a specific reference fixed (like a tax rate in cell C1), add a dollar sign before the column and row (e.g., $C$1). This is known as an absolute reference.

Check for Text Formatting

If your numbers appear correct but the SUM result is zero or wrong, the data might be stored as text. You can force Excel to recognize them as numbers by highlighting the column, right-clicking, selecting Format Cells, choosing Number, and clicking OK. Alternatively, use VALUE() to convert the text to numbers within the formula.

Use the Status Bar

For a quick check without typing a formula, select multiple non-adjacent cells. The status bar at the bottom right of the Excel window will display the Sum, Average, Count, and Min/Max values for that selection.

Troubleshooting

The result shows #VALUE!

This error occurs when Excel finds non-numeric data within the range you are trying to sum. Check your range for text entries, dates, or logical values (TRUE/FALSE). Ensure all cells in the sum range contain numbers.

The result shows #N/A

This error typically appears when using the SUMIF or SUMIFS functions with a lookup value that is not found in the criteria range. Verify that the criteria you are searching for (e.g., a specific product name) exists exactly as written in the data table.

Result is zero or incorrect

First, check if the cells are formatted as text. If that is not the issue, ensure you are not accidentally including the header row in your range. If you are summing a filtered list, remember that the standard SUM function ignores filters, so you will get the total of all rows, not just the visible ones.

AutoSum selects the wrong range

Excel attempts to guess the range based on surrounding data. If the range is incorrect, click inside the formula bar and manually adjust the cell references (e.g., change A1:A5 to A1:A10) before pressing Enter.

Frequently Asked Questions

Can I sum cells that are not next to each other?

Yes, you can. When typing the formula, separate the cell references with a comma. For example, =SUM(A1, C1, E1) will add the values in A1, C1, and E1 without needing them to be in a continuous block.

How do I add a constant to the sum?

You can add a number directly to the function. For instance, =SUM(A1:A5) + 100 will calculate the sum of A1 through A5 and then add 100 to the result.

What does the SUMIF function do?

It adds values in a range that meet a single condition. For example, you could use it to find the total sales for a specific region or the total of all products that cost more than a certain amount.

Why is my sum showing a date instead of a number?

Excel often formats numbers as dates if the values are large (e.g., over 100,000). Right-click the cell, select Format Cells, and choose Number to fix this.

Can I sum filtered rows?

By default, the SUM function ignores filters and sums everything in the range. To sum only the visible rows after applying a filter, you must use the AGGREGATE function or the Subtotal function.

How do I handle errors within the range?

If your range contains error values like #DIV/0!, the standard SUM will return that error. You can use the AGGREGATE function to ignore errors; for example, =AGGREGATE(9, 6, range) will sum the numbers while ignoring any error results.