How to Convert Text to Numbers in Excel
Excel for Microsoft 365 on Windows; Mac differences noted · Last checked · Suggest an edit
https://instructions.wiki/excel/convert-text-to-numbers-in-excel
Numbers pasted from a website or exported from another system often arrive as text. They sit on the left of the cell, show a green triangle in the corner, and SUM treats them as zero. Any of the methods below turns them back into real numbers.
Use the warning icon
Select the cells with the green triangle. A small warning icon appears next to the selection. Click it and choose Convert to Number. Every selected cell becomes a number at once. If no triangle shows, go to File, Options, Formulas and tick Numbers formatted as text or preceded by an apostrophe under Error checking rules.
Run Text to Columns
Select one column of text numbers, then go to Data, Text to Columns and click Finish on the first screen. Excel re-enters every value as a number. This works on a single column at a time and also fixes dates stored as text.
Multiply by 1 with Paste Special
Type 1 in any empty cell and copy it. Select the text numbers, press Ctrl + Alt + V (Command + Control + V on a Mac), choose Multiply, and click OK. Multiplying forces Excel to treat the text as a number, and unlike Text to Columns this handles several columns in one go. Delete the 1 afterward.
Convert with VALUE in a helper column
=VALUE(A2)
textis the cell holding the text number.
If A2 holds the text 1,250.00, the cell shows the number 1250. Fill the formula down, copy the results, and paste them over the originals with Paste Values.
Strip hidden characters first
Web pages often pad numbers with non-breaking spaces, which VALUE cannot read and TRIM alone cannot remove:
=VALUE(TRIM(SUBSTITUTE(A2, CHAR(160), "")))
SUBSTITUTEreplaces CHAR(160), the non-breaking space, with nothing.TRIMremoves ordinary spaces at either end.VALUEconverts what remains.
A cell holding " 1250 " with a non-breaking space in front shows 1250.
If the cells are formatted as Text. Changing the format to General on the Home tab does not convert existing entries by itself. After changing the format, run one of the methods above, or press F2 then Enter on each cell to re-enter it.
If VALUE returns #VALUE!. The cell contains something other than digits, a decimal point, or a thousands separator, such as a currency symbol or a stray letter. Remove it with SUBSTITUTE, for example =VALUE(SUBSTITUTE(A2, "$", "")).