Excel Summation Formula: Step-by-Step Guide
In this article
To sum numbers in Excel, the fastest way is to click an empty cell below or to the right of your numbers, press Alt + = (Windows) or Command + Shift + T (Mac), and then press Enter. Excel inserts the SUM formula and adds up the adjacent numbers automatically. If you prefer typing, enter =SUM(, select the range, close the parenthesis, and press Enter. This guide covers both methods, plus summing with criteria, handling errors, and fixing common problems.
What You'll Need
- A computer with Microsoft Excel (2010 or later, including Microsoft 365). The steps are nearly identical in Google Sheets, LibreOffice Calc, and Apple Numbers, but menu names may vary slightly.
- A spreadsheet with numeric values you want to add. The numbers can be in a single column, a single row, or a rectangular block.
- Basic familiarity with selecting cells and typing into the formula bar.
Step-by-Step
Method 1: AutoSum (Quickest)
- Click the empty cell directly below a column of numbers, or directly to the right of a row of numbers. This is where the total will appear.
- Press Alt + = on Windows, or Command + Shift + T on Mac. Excel will highlight the adjacent range it thinks you want to sum and insert
=SUM(in the cell. - Check the highlighted range. If it is correct, press Enter. If it is wrong, drag to select the correct range before pressing Enter.
- The total appears in the cell. Click the cell to see the formula in the formula bar.
Method 2: Typing the SUM Formula Manually
- Click the cell where you want the total.
- Type
=SUM((without spaces). Excel will show a tooltip listing the syntax:SUM(number1, [number2], ...). - Select the range of cells you want to add. For example, click A2, hold the mouse button, and drag down to A10. The range appears as
A2:A10in the formula. - Type a closing parenthesis
)and press Enter. - To sum non-adjacent cells, hold Ctrl (Windows) or Command (Mac) while clicking each cell, then close the parenthesis and press Enter. The formula will look like
=SUM(A2, A5, A8).
Method 3: Summing with Criteria (SUMIF and SUMIFS)
- Use
=SUMIF(range, criteria, [sum_range])when you have one condition. For example, to sum sales only for "North" region in column A with amounts in column B:=SUMIF(A2:A100, "North", B2:B100). - Use
=SUMIFS(sum_range, criteria_range1, criteria1, ...)for multiple conditions. For example, to sum sales for "North" region in January (where column C has month):=SUMIFS(B2:B100, A2:A100, "North", C2:C100, "January"). - Criteria can be numbers, text, or expressions. Use quotes around text and comparison operators like
">100"or"<>0". - For wildcard matching, use
*for multiple characters and?for a single character. For example,=SUMIF(A2:A100, "A*", B2:B100)sums all entries starting with "A".
Method 4: Summing an Entire Column or Row
- To sum an entire column, type
=SUM(A:A). This adds every number in column A, ignoring text and empty cells. - To sum an entire row, type
=SUM(1:1)for row 1. - Be careful: if you place this formula in the same column or row, it will create a circular reference. Put it in a different column or row.
Method 5: Adding a Running Total
- In the cell next to your first value (e.g., B2), enter
=SUM($A$2:A2). The dollar signs lock the first cell. - Drag the fill handle (the small square at the bottom-right of the cell) down to copy the formula to other rows.
- Each row will show the cumulative sum up to that point.
Common Mistakes
- Including the total cell in the range: If your formula is in B10 and you sum B1:B10, you get a circular reference. Always leave the formula cell out of the range.
- Using SUM on text-formatted numbers: If cells are stored as text (often indicated by a green triangle in the corner), SUM ignores them. Select the cells, click the warning icon, and choose "Convert to Number".
- Forgetting to close parentheses: Excel usually auto-corrects this, but if you get a #NAME? error, check for missing parentheses or misspelled function names.
- Using commas instead of colons:
=SUM(A2, A10)sums only two cells, while=SUM(A2:A10)sums the entire range. A colon means "through". - Summing hidden rows: SUM includes hidden rows. If you filter data and want to sum only visible rows, use
=SUBTOTAL(109, range)instead.
Tips
- Press Ctrl + Shift + Enter after typing a SUM formula if you are using array operations (rare for basic sums). For normal sums, just press Enter.
- Use the Status Bar: select a range of numbers and look at the bottom-right of the Excel window. It shows the sum, average, count, min, and max without writing any formula.
- To sum across multiple sheets, use a 3D reference like
=SUM(Sheet1:Sheet3!A1). This adds A1 from Sheet1, Sheet2, and Sheet3. - For quick totals, use the AutoSum button on the Home tab (it looks like the Greek letter sigma, Σ). It does the same as Alt+=.
- If your data is in a table (created with Ctrl+T), you can use structured references like
=SUM(Table1[Sales])which are easier to read.
Troubleshooting
If the sum is 0 or wrong
- Check if the cells contain numbers or text. Select the cells and look at the Number Format in the Home tab. If it says "Text", convert to Number.
- Look for hidden characters, like spaces. Use
=TRIM(A2)to remove extra spaces, or=CLEAN(A2)to remove non-printable characters. - Check if any cells are formatted as text with an apostrophe at the beginning (the apostrophe is not visible in the cell but appears in the formula bar). Remove it.
If you get #NAME? error
- This usually means Excel doesn't recognize the function name. Check for typos like
SUMMinstead ofSUM. - If you are using a non-English version of Excel, the function name might be different (e.g.,
SUMMEin German). Use the function wizard (fx button) to insert it correctly.
If you get #VALUE! error
- This occurs when a cell in the range contains text that Excel can't interpret as a number, or when you use the wrong argument type.
- Check for cells with error values (like #DIV/0!). Use
=IFERROR(SUM(range),0)to display 0 instead of an error.
If the formula doesn't update
- Press F9 to recalculate the workbook manually. If that works, check Calculation Options (Formulas tab) and set it to Automatic.
- If you have many formulas, Excel might be in Manual calculation mode. Change it to Automatic.
If you get a circular reference warning
- The formula refers to its own cell, directly or indirectly. Click the warning and Excel will trace the circular reference.
- Remove the self-reference. For example, if you are summing A1:A10 and the formula is in A10, change the range to A1:A9.
If AutoSum selects the wrong range
- After pressing Alt+=, manually drag to select the correct range before pressing Enter.
- Alternatively, type the range directly in the formula.
Frequently Asked Questions
Can I sum only visible cells after filtering?
Yes. Use =SUBTOTAL(109, range) instead of SUM. The 109 tells Excel to sum only visible (filtered) cells. The SUBTOTAL function also ignores rows hidden by filtering, but not rows hidden manually (right-click > Hide).
How do I sum cells based on multiple conditions?
Use SUMIFS. For example, =SUMIFS(C2:C100, A2:A100, "East", B2:B100, ">100") sums values in C where column A is "East" and column B is greater than 100. The sum_range comes first in SUMIFS, unlike SUMIF.
What is the difference between SUM and AutoSum?
AutoSum is a button that automatically inserts a SUM formula for you. It is a shortcut, not a separate function. The underlying formula is always SUM.
Why does my SUM formula show 0 even though the cells have numbers?
Most likely the cells are formatted as text. Select the cells, go to the Home tab, and change the Number Format to "Number". If that doesn't work, use the Text to Columns wizard (Data tab) and click Finish to convert text to numbers.
Can I sum across multiple sheets?
Yes. Use a 3D reference like =SUM(Sheet1:Sheet3!A1) to sum cell A1 across all sheets from Sheet1 to Sheet3. Make sure the sheets are in order in the tab bar.
How do I add a running total in Excel?
Use a formula like =SUM($A$2:A2) in the first row, then copy it down. The dollar signs lock the starting cell, so each row sums from the top to the current row.