ExcelyourTraining

Home › Blog

Excel SUM returning 0? Three reasons your total is wrong, and how to fix each one

You've written the formula. It looks right. But the answer is R0.00, or a count that's too low, or an invoice total that's one cent off from what you get on a calculator.

These problems come up again and again, and they usually have one of three causes. This post shows you how to spot each one in under a minute and fix it for good. You'll find out why your Excel SUM is returning 0, why COUNT skips some cells, and why rounded cents don't add up.

Problem 1: Excel SUM returning 0 (numbers stored as text)

Thandi exports last month's sales from her shop's point-of-sale system in Pretoria and pastes them into Excel. She types =SUM(B2:B6) and gets 0.

A B
1 Week Sales (R)
2 Week 1 4 350
3 Week 2 3 980
4 Week 3 5 120
5 Week 4 4 760
6 Week 5 1 290
7 Total 0

The formula isn't the problem. The numbers are. They look like numbers, but Excel has stored them as text. SUM ignores text, so it has nothing to add.

How to spot it

If only some of the cells are text, you won't get 0. You'll get a total that's too low, which is harder to notice. Here, if only Week 3 were stored as text, SUM would give R14 380 instead of R19 500.

How to fix it

  1. Select the cells with the green triangles.
  2. Click the warning icon next to the selection.
  3. Choose Convert to Number.

The numbers jump to the right, the triangles disappear and the total updates to R19 500.

If you don't see green triangles, try the VALUE function in a spare column: =VALUE(B2) turns text that looks like a number into a real number. Copy it down, then use those cells in your SUM.

One more cause worth ruling out: if a total doesn't change when you edit a number, check Formulas > Calculation Options and make sure it's set to Automatic.

Problem 2: COUNT skipping cells (COUNT vs COUNTA)

Lerato is collecting R150 from seven colleagues for a year-end braai. She keeps a list:

A B
1 Name Paid (R)
2 Thandi 150
3 Pieter
4 Aisha 150
5 Johan Pending
6 Lerato 150
7 Sipho
8 Mia 150

She types =COUNT(B2:B8) to see how many people have responded and gets 4. She expected 5, because Johan has an entry too.

COUNT isn't broken. It only counts cells that contain numbers. "Pending" is text, so COUNT skips it. That's also why COUNT misses numbers stored as text, the problem from the first section.

Each counting function answers a different question:

Formula Result Question it answers
=COUNT(B2:B8) 4 How many have paid?
=COUNTA(B2:B8) 5 How many cells have anything in them?
=COUNTBLANK(B2:B8) 2 How many haven't responded at all?
=COUNTA(A2:A8) 7 How many people are on the list?

So when you're comparing COUNT vs COUNTA in Excel, the question to ask is "do I want numbers only, or anything at all?"

Two details catch people out. COUNTA counts a cell with a formula that returns empty text (""), even though it looks blank. COUNTBLANK counts that same cell as blank. And COUNTBLANK doesn't count zeros, because a zero is a value.

Problem 3: cents that don't add up

Aisha runs a small print shop in Durban. Her invoice works out VAT at 15% on each line, with the rate in B1.

A B C
1 VAT rate 15%
3 Item Excl. VAT (R) VAT (R)
4 Paper stock 412.38 61.86
5 Ink 225.78 33.87
6 Binding 141.18 21.18
7 Total VAT 116.90

The VAT cells use =B4*$B$1, copied down, and the column is formatted to show two decimals. Her client adds up the VAT column on a calculator: 61.86 + 33.87 + 21.18 = R116.91. Excel says R116.90. Who's right?

Both are, in a way. Formatting a cell to two decimal places only changes what you see. Excel still stores the full value and uses it in every calculation. The real VAT values are 61.857, 33.867 and 21.177. Those add up to 116.901, which displays as R116.90.

On a single invoice it's one cent. Across hundreds of payslips or invoices, those differences add up, and they're hard to explain to a client or an auditor.

The fix: round in the formula, not just the format

To round to 2 decimal places in Excel so the stored value matches what's displayed, wrap the calculation in ROUND:

=ROUND(B4*$B$1, 2)

Now each VAT cell really holds 61.86, 33.87 and 21.18, and =SUM(C4:C6) gives R116.91. What's printed and what's calculated finally agree.

The second argument is the number of decimal places. Use 2 for cents. Use 0 for whole rand.

When to use ROUNDUP and ROUNDDOWN

ROUND goes to the nearest value. Sometimes you need a fixed direction:

Whatever you choose, be consistent. Decide whether you round each line or only the total, and use the same rule on every document.

A one-minute checklist for a wrong total

  1. Are the numbers on the left of the cell, or showing green triangles? Convert them to numbers.
  2. Are you counting numbers only (COUNT) or all entries (COUNTA)?
  3. Does the displayed total differ from adding the visible values? Use ROUND inside the formula.
  4. Does the formula's range cover every row? Click the cell and check the range in the formula bar.

Practise the fixes

Each of these problems has its own short lesson on ExcelyourTraining. You work in a real spreadsheet in your browser and get feedback the moment you press Enter.

Try lesson 9 first if the cents problem is the one bothering you. It's free, with no sign-up.