SUM in Excel: The Five Ways People Sum Wrong

Five common ways people get SUM wrong in Excel

Source: official Microsoft documentation for Excel functions.

SUM is the first function anyone learns and the one that quietly produces the wrong number in real workbooks. The formula is rarely wrong. What it includes is. These are the five ways a SUM goes wrong in practice, each with the fix.

Version note: SUM, SUMIF, SUMIFS, SUBTOTAL and AGGREGATE behave the same in Excel 2016 through Microsoft 365, on the web and on Mac. Sources: SUM, SUBTOTAL and SUMIFS in Microsoft Support.

1. The range includes a total row

The most common wrong answer is double counting. A column runs from row 2 to row 40 and row 41 already holds a total, so =SUM(C2:C41) adds the total to itself. The number is roughly double and nothing warns you. Keep totals out of the summed range, or sum only the table body by referencing the table column, which grows and shrinks with the data.

2. The numbers are stored as text

Imported data often arrives with numbers stored as text, and SUM ignores text completely: the result is zero or far too small. The tell is alignment, since text sits left and numbers sit right. Fix the data with Data, then Text to Columns, then Finish, rather than wrapping the formula in VALUE and carrying the problem forward.

3. Hidden and filtered rows are still included

SUM adds every cell in the range, visible or not. Filter a table to one region and the SUM at the bottom still shows the whole country. If you need the total of what is on screen, use SUBTOTAL with function number 9, or 109 to also ignore manually hidden rows, and use AGGREGATE when you also need to skip error values.

FunctionIgnores filtered rowsIgnores manually hidden rowsIgnores errors
SUMNoNoNo
SUBTOTAL(9)YesNoNo
SUBTOTAL(109)YesYesNo
AGGREGATE(9,7)YesYesYes

4. One error value poisons the total

A single #N/A anywhere in the range turns the whole SUM into #N/A, which is correct behaviour and terrible for a dashboard. Find the error first: select the range, use Find and Replace with Look in set to Formulas and search for #N/A. If the error is expected, use AGGREGATE with option 7 to skip it, or wrap the offending cells in IFERROR.

5. Rounding drift between the parts and the whole

If a column holds rounded values, its SUM will not match the sum of the unrounded values. For money, decide once where the rounding happens: round each line and let the total be the sum of the rounded lines, or keep full precision and round only the display. Mixing the two is what produces an invoice whose lines do not add up to its total.

Summing with conditions

SUMIF handles one condition and SUMIFS handles several, with the sum range first and the criteria pairs after: =SUMIFS(D2:D500,B2:B500,"Cairo",C2:C500,"Paid"). The order is the opposite of SUMIF, where the range comes first and the sum range last, and that reversal is a reliable source of wrong answers.

Quick checklist

  • Total row outside the summed range.
  • Column aligned right, so numbers are really numbers.
  • Filtered view needs SUBTOTAL or AGGREGATE, not SUM.
  • Any #N/A in the range will show up in the total.
  • Rounding decided once, for lines or for the total.

Every one of these failures produces a plausible number, which is why they survive. The check that catches all five takes ten seconds: compare the SUM against a count of the rows you expect, and against a quick manual sum of three cells.

This is general guidance, not a substitute for checking your own workbook.

Last updated: 3 December 2026

If you invoice clients or run a small shop, the ready-made Excel sales invoice template and bookkeeping ledger saves building the file from scratch: Excel invoice and bookkeeping template - a product in our store.

المصدر: Microsoft Support: SUM function

A worked example: the same column, three answers

Six cells imported from an invoicing system. Only three of them are real numbers:

CellContentCounts as a number?
A21,200Yes
A3950Yes
A41,500 (stored as text)No
A5n/aNo
A6800Yes
A7(blank)No

=SUM(A2:A7) returns 2,950. The true total of the invoice is 4,450. The 1,500 was typed or exported as text, so SUM skipped it without a warning. This is the single most common cause of a total that looks plausible and is wrong.

=SUM(VALUE(A4)) confirms the value can be converted. To fix the whole column, put =IF(ISTEXT(A2),VALUE(A2),A2) in a helper column, check the count matches, then paste the helper over the original as values.

SUM, SUBTOTAL, AGGREGATE

FunctionIgnores hidden rows?Ignores errors?
SUMNoNo
SUBTOTAL(9,…)YesNo
AGGREGATE(9,…)Yes, with the right optionYes

If your report has a filtered table, SUBTOTAL is the function that matches what the reader expects to see. A plain SUM keeps adding rows that are hidden by the filter, which is why two people can look at the same sheet and disagree on the total.

Checks before you trust a total

Compare COUNT against the number of visible rows. If they differ, you have text or blanks in the range. Then check the largest single value against the source document; a missing row is easier to spot that way than by staring at a total.

The ten-second check before you trust a total

Three questions catch almost every bad total. Does the count of numbers match the number of rows? If not, part of the column is text. Does the total change when you filter? If it does not, you are using SUM where SUBTOTAL belongs. Does summing the whole column give the same answer as your formula? If not, the range is short. Run those three in ten seconds and you will find the error before the person who reads your report does. Keep the checks in a spare column at the top of the sheet so the next person inherits the habit rather than the mistake.

One last habit: before you share the sheet, put your expected number for each column in a spare cell and compare it with what the formula returns. The gap is the only part worth your time; everything else is reassurance.

Get new guides by email
One short email when a new guide is published. No spam, and you can leave anytime.
Your address is only used for these emails.

Last updated: 5 December 2026

Comments

Popular posts from this blog

Learn to Code From Zero: A 90-Day Plan That Survives a Full-Time Job

How to Read Your Payslip: Gross, Net, Tax Codes and the YTD Column

iPhone Storage Full? What to Delete First (And What Never to Touch)