How to Convert Numbers Stored as Text to Numbers in Excel
If numbers are aligned left or a green triangle shows in the cell corner, they are numbers stored as text. VALUE converts them to numbers.
Formula to use
=VALUE(A2)The text "1234" to the number 1234
Check whether it is text
If ISTEXT is TRUE, it is text. SUM skips numbers stored as text in a range, so the total comes out too small (or 0).
=ISTEXT(A2)TRUE means a number stored as text
Convert all at once without a formula
Select the whole column, choose Data > Text to Columns and click Finish right away; the values become numbers.
You can also click the warning icon next to the cell and choose Convert to Number.
Convert inside a formula
Excel converts text to numbers when it calculates, so multiplying by 1 or putting two minus signs in front also works.
=A2*1Same result as VALUE(A2)=SUMPRODUCT(--A2:A10)Sum of a range of numbers stored as text
When it will not convert
Leading or trailing spaces, or special spaces from the web, give #VALUE!. Remove them with TRIM and SUBSTITUTE first.
=VALUE(TRIM(SUBSTITUTE(A2, CHAR(160), " ")))Clean up spaces, then convert
Try the functions used here
Change the arguments in the function playground and watch the calculation step by step.
- VALUE functionConverts text that looks like a number into a real number.
- ISTEXT functionChecks whether a value is text.
- ISNUMBER functionChecks whether a value is a number.
- TRIM functionRemoves leading and trailing spaces and leaves single spaces between words.
- SUMPRODUCT functionMultiplies values in matching positions and adds the results.
FAQ
- How do I convert numbers to text instead?
- Use =TEXT(A2, "0") or =A2&"". To keep leading zeros, give a digit format such as =TEXT(A2, "00000").
- My dates are stored as text.
- Convert them to date serial numbers with DATEVALUE.