Formula Fixer

Numbers Stored as Text in Excel: 7 Fixes That Work

Updated 2026-12-04

TL;DR: If SUM returns 0, numbers sit on the left or you see a green triangle, the cells hold text, not numbers. Fastest fix in Excel: select the cells, click the warning icon and choose Convert to Number. With formulas: =VALUE(A2) or =--TRIM(A2) for normal text numbers, =NUMBERVALUE(A2,",",".") for European formats like 1.234,56, and =VALUE(SUBSTITUTE(A2,UNICHAR(160),"")) when data copied from a web page contains non-breaking spaces.

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

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

What each fix did in our test

Text in A2=VALUE(A2)=--TRIM(A2)=NUMBERVALUE(A2,",",".")Fix that worked
1234 (left-aligned)12341234errorVALUE or --
  56  (spaces)5656error--TRIM(A2)
$1,234.501234.51234.5errorVALUE (US-style text)
12%0.120.12errorVALUE
1.234,56 (European)errorerror1234.56NUMBERVALUE(A2,",",".")
1 000 with a non-breaking space (from a web page)errorerrorerror=VALUE(SUBSTITUTE(A2,UNICHAR(160),""))
789- (trailing minus)-789-789errorVALUE, or the IF formula below
abcerrorerrorerrorNot 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

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?

Related: How to Fix the #VALUE! Error in Excel and Google Sheets · Split and Combine Text: TEXTSPLIT, TEXTJOIN, LEFT, RIGHT, MID

Templates we sell: see all downloads and prices.

← More guides