How to fix numbers stored as text in Excel

SUM of a number stored as text is 0. Why your Excel formula returns 0 already shows that for the text $1,234.50. This page is how to turn the text into a number.

US text and European text are both 1234.5

VALUE reads the workbook’s own separators. In a US workbook, $1,234.50 is 1234.5. The same function does not understand a comma used as the decimal mark.

VALUE
=VALUE(A2)
=VALUE(A2)B2
Two ways to write 1234.5
AB
1TextNumber
2$1,234.501234.5
31.234,501234.5
4SUM of the text0
5SUM of the numbers2469
A picture of two imported amounts. The US text becomes 1234.5 with VALUE. The European text becomes 1234.5 with NUMBERVALUE. SUM of the text is 0. The two numbers add to 2,469.
=VALUE("$1,234.50")
=NUMBERVALUE("1.234,50",",",".")
=SUM(A2:A3)
=1234.5+1234.5

NUMBERVALUE of 1.234,50, with a comma as the decimal mark and a period as the group mark, is also 1234.5. The NUMBERVALUE page says VALUE of that European text in a US workbook is #VALUE!. Use NUMBERVALUE when the file was written with the other separators. Use VALUE when the text already matches the workbook.

SUM of the two text cells is 0. 1,234.5 + 1,234.5 = 2,469. Add the converted column, not the text column.

A trailing percent sign is part of NUMBERVALUE’s job: it divides by 100. That is a different input from these two amounts.

Digits only is the wrong tool for money

xl.digits.only keeps every digit and drops everything else. The result is text, which is why a leading zero can survive. The phone on that page is 512-555-0148, and the result is the text 5125550148.

xl.digits.only
=xl.digits.only(A2)
=xl.digits.only(A2)B2
Digits, still as text
AB
1RawDigits
2512-555-01485125550148
A picture of the phone on the digits-only page. The result is the text 5125550148, so a leading zero could survive. VALUE of that text is the number 5125550148.
=xl.digits.only("512-555-0148")
=VALUE("5125550148")
=xl.digits.only("$1,234.50")

VALUE of 5125550148 is the number 5125550148. The name needs Microsoft 365, Excel 2024, or Excel for the web. Excel 2021 returns #NAME?.

Do not run it on the currency text. $1,234.50 has digits 1, 2, 3, 4, 5, and 0. The dollar sign, the comma, and the decimal point are dropped, so the text result is 123450. That is not 1234.5. VALUE and NUMBERVALUE are the money tools. Digits only is the phone, the id, and any other string where the decimal point is not part of the number.


More from the blog