Text Formulas

How to Convert Text to Numbers in Excel

Turn numbers stored as text back into real numbers with Convert to Number, VALUE, NUMBERVALUE or a multiply trick, and fix the causes first.

On this page
  1. Spot numbers stored as text
  2. Use Convert to Number for a quick fix
  3. Multiply by 1 with Paste Special
  4. Use a formula
  5. Causes that stop a conversion
  6. Errors after converting
  7. Check the result

Spot numbers stored as text

A number stored as text often shows a small green triangle in the top-left corner of the cell. Excel may also show a warning icon when you select the cell, with the message “Number Stored as Text.” Text is left-aligned by default and real numbers are right-aligned, so a column of left-aligned numbers is a clue.

This matters because SUM skips numbers stored as text. A total can come out low or zero. Why does sum show 0 in excel lists the other usual reasons.

Use Convert to Number for a quick fix

Select the cells, click the warning icon, and choose Convert to Number. Excel changes the cells in place.

Multiply by 1 with Paste Special

This works on any range, even when no warning icon appears:

  1. Type 1 in an empty cell and copy it.
  2. Select the cells that hold the text numbers.
  3. Right-click, choose Paste Special, pick Multiply under Operation, and click OK.
  4. Delete the 1 you typed.

Use a formula

A formula leaves the original text as it is and returns a number:

  • =VALUE(A2) converts the text. It returns #VALUE! if Excel can’t read the text as a number.
  • =--A2 uses two minus signs and does the same job.
  • =A2*1 or =A2+0 also works.
  • =NUMBERVALUE(A2,".",",") sets the decimal and group separators yourself. That helps when your data uses a different format from your settings.

Causes that stop a conversion

When a conversion fails or leaves the value wrong, the cause is often one of these:

  • Non-breaking spaces and hidden characters. These stop the text from being read as a number. Remove them first, as explained in remove non printing characters in excel.
  • Decimal and thousands separators. Some regions write 1.250,50 with a dot for thousands and a comma for decimals. NUMBERVALUE lets you set those separators.
  • Currency signs and thousands commas. VALUE may handle “$1,250” in some settings but not others. Removing the symbol and the comma first is more reliable. A substitute function in excel example shows the steps.
  • A leading apostrophe. An apostrophe at the start of a value forces it to be text. It shows in the formula bar but not in the cell. Retype the value without it, or use Convert to Number.
  • Dates stored as text. These need their own fix, covered in excel not recognizing dates as dates.

Errors after converting

If a cell holds text such as N/A or TBD, VALUE returns #VALUE!, because there’s no number to read. The steps for tracking those cells down are in how to fix #value error in excel. Wrapping the formula in IFERROR can hide the error, which keeps the sheet tidy but can also hide a real problem. Whether hiding it is worth the trade-off is covered in how to hide errors in excel formulas.

Check the result

Use =ISNUMBER(A2) next to the converted cells. It returns TRUE for a real number and FALSE for text. Fill it down the column to check every value before you rely on a total.

The complete guide to text formulas

Text Formulas in Excel Explained
Read the guide

Keep exploring

Guides from other topics

All topics →