Instant digital downloadExcel and Google SheetsSecure card checkout

Excel and Google Sheets how-to

Why your SUM says 0, and how to fix it

The amounts are right there in the column, and the total says 0. They look like numbers, but the sheet has them stored as text, and SUM skips text.

ABC
1ItemAmountFixed
2Rent1200 1200
3Power95 95
4Phone60 60
5Food340 340
6Gas105 105
7Total01800

Sample data. Column B holds numbers stored as text. C2 holds =VALUE(B2), filled down. B7 holds =SUM(B2:B6) and C7 holds =SUM(C2:C6).

Why it says 0

=SUM(B2:B6)

SUM adds numbers and skips text in a range. Microsoft's SUM page puts it plainly: it "will ignore text values". A number stored as text looks like any other number, so nothing warns you. If every amount is text the total is 0, and if only some are, the total is just too low, which is harder to catch.

How to spot them

Text sits on the left of the cell by default and real numbers sit on the right, unless someone has changed the alignment. Excel usually adds a small green triangle in the corner of the cell too. To be sure, ask the sheet:

=ISTEXT(B2)

TRUE means B2 is text. =ISNUMBER(B2) gives FALSE on the same cell.

The fix: a new column with VALUE

  1. Click the empty cell beside your first number.
  2. Type =VALUE(B2) and press Enter. You get 1200, now a real number on the right of the cell.
  3. Drag it down the column.
  4. Total the new column:
=SUM(C2:C6)

That gives 1800. To put the real numbers back in the first column, copy the new column, paste it over the old one as values only, then delete the extra column.

A total with no extra column

=SUMPRODUCT(--B2:B6)

This also gives 1800. The two minus signs turn each text number into a real number, and SUMPRODUCT adds them up. One catch: a cell holding a word gives an error, so point it only at the numbers, not at a heading.

When VALUE gives an error

Something is hiding in the cell. A stray space is the usual one, and TRIM clears it:

=VALUE(TRIM(B2))

Numbers copied from a web page can carry a non-breaking space, which TRIM leaves behind. Take it out by its character code:

=VALUE(SUBSTITUTE(B2,UNICHAR(160),""))

Commas are fine: =VALUE("1,200") gives 1200.

The one-click fix in Excel

Excel can often do this without a formula. Select the cells, click the warning icon that appears beside them, and choose Convert to Number. The steps are on Microsoft's page on numbers stored as text. No icon? Use VALUE as above.

Watch it in 27 seconds

Templates with the math already done

Rather skip the formulas? These templates come with every formula built and checked, plus a filled-in sample.

Teaching this to a class or team?

Get one tip like this a month

A free email from VARS Digital with one Excel or Google Sheets fix, tested in both apps. No spam, unsubscribe any time.

By signing up you agree that VARS Digital, 10151 240 Street, Maple Ridge, BC V2W 0G9, Canada (inquiries@varsdigital.app) may email you its newsletter: Excel and Google Sheets tips, updates and news about our templates and lessons. We send a confirmation email first, and nothing else goes out until you click it. Every email has an unsubscribe link, and you can leave any time. Details in our store policies.

More how-tos