Numbers Stored as Text in Excel: 7 Fixes That Work
Your column of sales adds up to zero. The numbers look perfectly normal, yet SUM ignores them, VLOOKUP cannot find them and sorting puts 100 before 20. The culprit is almost always numbers stored as text, usually after an import from a bank, a CRM or a web page. Here is how to spot it in seconds and the fix for each kind of messy data, all tested.
How to tell if numbers are stored as text
- They are left-aligned in the cell (real numbers align right by default)
- Excel shows a small green triangle in the top-left corner of the cell
- =SUM(range) returns 0 or a too-small total, while =COUNTA(range) counts them
- =ISTEXT(A2) returns TRUE
- Quick count of the problem cells:
=SUMPRODUCT(--ISTEXT(A2:A500))
In our test column of eight text values, =COUNT returned 0, =COUNTA returned 8 and =SUM returned 0, which is the classic symptom.
Fix 1: Convert to Number (Excel, no formulas)
Select the cells, click the warning icon that appears next to them (or press Alt+Shift+F10) and choose Convert to Number, as Microsoft's support page describes. If you do not see the icon, turn on background error checking under File, Options, Formulas. This converts in place and is the quickest fix for a one-off import.
Fix 2: VALUE or a double minus
In a helper column:
=VALUE(A2)
=--A2
Both turn '1234', '$1,234.50' and '12%' into 1234, 1234.5 and 0.12 in a US-English spreadsheet. The double minus is shorter and is handy inside other formulas, such as
=SUMPRODUCT(--A2:A500)Copy the helper column and use Paste Special, Values to replace the originals.
Fix 3: extra spaces with TRIM
Leading or trailing spaces stop the conversion in some cases and break lookups. Combine:
=--TRIM(A2)
Fix 4: European decimals with NUMBERVALUE
'1.234,56' (comma as decimal separator) fails with VALUE in a US-English spreadsheet. NUMBERVALUE lets you name the separators:
=NUMBERVALUE(A2,",",".")
That returns 1234.56. It also handles '1 234,56' with ordinary spaces as thousands separators. Microsoft describes NUMBERVALUE as converting text to a number in a locale-independent way; it works in Excel 2013 and later and in Google Sheets.
Fix 5: non-breaking spaces from web pages
Numbers copied from a website or PDF often contain a non-breaking space (character 160) that TRIM does not remove. Strip it first:
=VALUE(SUBSTITUTE(A2,UNICHAR(160),""))
In our test, '1 000' with a non-breaking space failed with VALUE, TRIM and NUMBERVALUE, and converted correctly to 1000 with this formula. For European formats with the same problem, wrap NUMBERVALUE around the SUBSTITUTE instead.
Fix 6: trailing minus signs (accounting exports)
Some systems export negatives as '789-'. In our test VALUE converted it to -789 directly; if your version does not, this formula handles it explicitly:
=IF(RIGHT(TRIM(A2))="-",-VALUE(LEFT(TRIM(A2),LEN(TRIM(A2))-1)),VALUE(A2))
Fix 7: Text to Columns or Paste Special
- Text to Columns: select the column, Data, Text to Columns, Finish. Excel re-reads each cell and converts numbers
- Multiply by 1: type 1 in an empty cell, copy it, select the text numbers, Paste Special, Multiply
- Google Sheets: select the column and choose Format, Number, Number; if values stay left-aligned, use a VALUE helper column
What each fix did in our test
| Text in A2 | =VALUE(A2) | =--TRIM(A2) | =NUMBERVALUE(A2,",",".") | Fix that worked |
|---|---|---|---|---|
| 1234 (left-aligned) | 1234 | 1234 | error | VALUE or -- |
| 56 (spaces) | 56 | 56 | error | --TRIM(A2) |
| $1,234.50 | 1234.5 | 1234.5 | error | VALUE (US-style text) |
| 12% | 0.12 | 0.12 | error | VALUE |
| 1.234,56 (European) | error | error | 1234.56 | NUMBERVALUE(A2,",",".") |
| 1 000 with a non-breaking space (from a web page) | error | error | error | =VALUE(SUBSTITUTE(A2,UNICHAR(160),"")) |
| 789- (trailing minus) | -789 | -789 | error | VALUE, or the IF formula below |
| abc | error | error | error | Not a number; fix the data |
Tested in a US-English spreadsheet; 'error' means #VALUE!. In a European locale, VALUE reads commas as decimals, which is exactly why NUMBERVALUE with explicit separators is the safer choice for shared files.
Prevent it next time
- Import CSV files with Data, From Text/CSV and set the column type to number (or Decimal Number) instead of opening them directly
- Do not format a column as Text before typing numbers into it
- Keep IDs that must keep leading zeros (ZIP codes, product codes) as text on purpose, and do not convert those
- Wrap lookups with the same type on both sides; a text '1001' will not match the number 1001 in XLOOKUP or VLOOKUP, a common cause of #N/A
Quick FAQ
Why does Excel SUM return 0? Usually because the numbers are stored as text. SUM skips text, so convert the cells with Convert to Number, VALUE or a double minus and the total appears.
How do I convert text to numbers in Excel quickly? Select the cells, click the green-triangle warning icon and choose Convert to Number. For a formula, use =VALUE(A2) or =--A2.
How do I convert '1.234,56' to a number? Use =NUMBERVALUE(A2,",",".") so Excel or Google Sheets reads the comma as the decimal separator. It returns 1234.56.
Why does VALUE give #VALUE!? The text contains something that is not part of a number in your locale: a non-breaking space, a different decimal separator or letters. Try SUBSTITUTE with UNICHAR(160) or NUMBERVALUE.
How do I remove the green triangle without converting? If the text is intentional (such as product codes with leading zeros), click the warning icon and choose Ignore Error.
Does Google Sheets have numbers stored as text? Yes. Imported or pasted values can stay as text; =VALUE, =NUMBERVALUE and Format, Number, Number fix them the same way.
Sources: Microsoft Support: Convert numbers stored as text to numbers; Microsoft Support: NUMBERVALUE function. All results tested in a spreadsheet on 4 December 2026.
Prefer a ready-made file?
- Excel & Google Sheets Formula Cheat Sheet (50 tested formulas + practice workbook) (US$4, Payhip): 50 formulas for lookups, SUMIFS, IF, text, dates, percentages and FILTER/UNIQUE, each shown with its result, plus an error-fix page and a practice workbook.
Related: How to Fix the #VALUE! Error in Excel and Google Sheets · Split and Combine Text: TEXTSPLIT, TEXTJOIN, LEFT, RIGHT, MID