To convert text-formatted numbers in an Excel column, select the cells, click the warning icon that appears beside the selection, and choose Convert to Number. If no warning icon appears, use Data > Text to Columns and click Finish, or convert a separate copy with a formula. These methods turn numeric-looking text into values Excel can calculate, sort, and chart. Before changing the column, check whether any entries are IDs or codes that need to keep leading zeros.
What You’ll Need
- A workbook in Microsoft Excel for Microsoft 365 on Windows, with the column you want to convert.
- If the data matters, a copy of the workbook or an unused column where you can keep the original values until you verify the results.
- A quick understanding of whether the entries are quantities, prices, or dates, or are identifiers such as product codes. Identifiers may need to remain text even when they contain only digits.
Step-by-Step
- Check that the cells contain numbers stored as text. Select a few entries and look at how they align and behave. Text-formatted numbers often appear left-aligned by default, while numbers usually appear right-aligned, but alignment can be changed manually, so it is not proof by itself. You can also try a simple calculation in an empty cell, such as adding one to a sample. If Excel reports an error or treats the value as text, conversion may be needed. Look for a small green triangle in a cell’s top-left corner; it can indicate a number stored as text. Don’t convert automatically if the values are codes that must preserve their exact characters.
- Save a safe copy or preserve the source column. If you are working with important data, use File > Save As to create a working copy. Alternatively, insert a blank column beside the source column and convert the copy first. This lets you compare the results and restore the original if Excel interprets a value incorrectly. Converting text does not always produce the value you expect: for example, a long digit string may be an account number rather than a quantity, and a date-like string may be interpreted according to your regional settings.
- Use the warning icon for a quick conversion. Select the affected cells, or select the whole range in the column if all its entries are intended to be numbers. When Excel identifies numbers stored as text, a warning icon appears near the selection. Click it and choose Convert to Number. Check several cells afterward: the warning indicators should disappear, and the values should work in arithmetic and numeric sorting. Excel may not show the warning icon if error checking is disabled, if the cells are not flagged, or if the selection includes a mix of types. In that case, use Text to Columns below.
- Convert a whole range with Text to Columns. Select the cells containing the text numbers, not the entire worksheet. Go to Data > Text to Columns. In the wizard, choose Delimited and click Next. On the delimiter screen, clear any selected delimiter boxes so Excel does not split the values, then click Next. Choose General as the column data format, check that the destination is the range you intend to replace, and click Finish. For a column of ordinary numeric text, this prompts Excel to interpret the entries as numbers. If you want to retain the source, set the destination to a blank column before finishing. On Mac, the command is also available under the Data tab as Text to Columns, though the wizard’s appearance may differ. Excel for the web may not offer the same full wizard; use the warning icon if available, or open the workbook in the desktop app.
- Use a formula if you want to keep the original column. Suppose the text values are in A2:A20. In B2, enter
=VALUE(A2), then press Enter. This converts a value Excel recognizes as a number; for example, if A2 contains the text 1250, B2 returns the numeric value 1250. Fill the formula down by dragging the fill handle or double-clicking it, then check the results. To replace the original column, copy the converted results and use Home > Paste > Paste Values over the original cells only after confirming that they are correct. The formula results update if the source changes; pasted values do not. - Verify that Excel now treats the entries as numbers. Test a few cells with a calculation or use Home > Number Format to apply a numeric display such as Number or Currency. Try sorting a small copy of the data: numeric sorting should order values by size, rather than placing every value according to its first character. Formatting changes only how a value looks; it does not convert text to a number. That is why the conversion step comes first. If a result looks different from the source, inspect its digits and decimal places before replacing anything.
Common Mistakes
Changing the number format and assuming the value is converted. Choosing Number from the Number Format list changes the display format of cells, but a text value can remain text. Apply the format after conversion if you want a particular appearance; use a conversion method to change the underlying value.
Converting identifiers that need leading zeros. A code such as 00427 may become 427 when treated as a number. If the zeros are meaningful, keep the entries as text. A custom number format can display leading zeros for numeric values, but it does not preserve them as part of the actual value, which may matter when exporting or matching data.
Letting Text to Columns split entries. If a delimiter box is selected, the wizard can divide a value into multiple columns. Check the delimiter screen and clear the boxes when the source is a single field. Also confirm the destination so you do not overwrite neighboring data.
Replacing the source before checking results. A mixed column may include blanks, text labels, values with spaces, or dates. Convert a copy first, review unusual entries, and only then paste values over the original if that is what you need.
Tips
- Work with the actual data range. Select the filled cells in the column rather than every worksheet row when practical. This makes it easier to spot unintended changes and avoid affecting unrelated cells.
- Keep a clear distinction between values and labels. Amounts and counts are usually numbers. Postal codes, phone numbers, employee IDs, and product codes are usually labels, even if they contain digits. Decide based on how the data will be used, not on its appearance.
- Check decimal and thousands separators. Excel reads separators according to its regional settings and the source format. A value written as 1,234.56 in one region may use a different convention elsewhere. Review a few converted values, especially if the data came from another country or system.
- Use a formula for repeatable cleanup. A formula column is helpful when you receive updated source data regularly, because you can fill the conversion down again. For a one-time cleanup, a direct conversion or Text to Columns is usually quicker.
- Apply display formatting after conversion. Once the values are numeric, select the cells and use Home > Number Format to display currency, percentages, or a chosen number of decimal places. The format affects display, not the stored numeric value.
Troubleshooting
The warning icon does not appear. Try selecting the cells individually or use Data > Text to Columns. Excel may not flag every text number, and error-checking settings can affect whether indicators appear. If neither option is suitable, enter the VALUE formula in a neighboring column and inspect its result.
The formula returns #VALUE!. The text may contain spaces, hidden characters, letters, or separators Excel does not recognize. Check the source by editing a cell and inspecting the beginning and end of its contents. A copied value can include a nonbreaking space that looks like an ordinary space. Clean or replace the unwanted characters in a separate column, then try conversion again. Avoid deleting punctuation without checking its meaning; a comma may be a thousands separator or a decimal separator depending on the source.
The result has the wrong decimal value or becomes a date. Excel may be interpreting the text using your computer’s regional conventions or recognizing a date pattern. Undo immediately if possible, or restore the saved copy. Re-run Text to Columns and inspect its preview and column data format. If the value is an identifier or a date-like code, choose a text-preserving approach rather than forcing it into a number.
Some cells convert and others do not. The column may contain mixed data, such as numeric text, blank cells, labels, and numbers with different separators. Filter or sort a copy to find exceptions, and convert only entries that represent numbers. A formula column can help reveal which values fail, but do not replace the entire source until those exceptions have been reviewed.
Leading zeros disappear. That is expected when Excel converts a value to a number because zeros at the start do not change its numeric value. Undo the conversion if those zeros are part of an identifier. Keep the data as text or restore it from the original source; changing the cell’s format afterward cannot recover zeros that have already been discarded unless you know how many belong there.
Frequently Asked Questions
Why does Excel store a number as text?
Values may be imported from a website, CSV file, database, or another spreadsheet with text formatting. A leading apostrophe or extra spaces can also cause Excel to keep a numeric-looking entry as text. The characters can look like a number even though Excel will not calculate with them as expected.
What is the fastest way to convert a whole column?
Select the affected range and use the warning icon’s Convert to Number command if Excel offers it. Otherwise, use Data > Text to Columns with no delimiters selected and General as the column format. For either approach, check that the range contains values that should actually be numbers.
Can I convert text to numbers without changing the original?
Yes. Put =VALUE(A2) in a neighboring column when the source is in A2, then fill it down. Review the results and leave the original column untouched, or copy the results and paste values into a new location. The formula returns a numeric result only when Excel can interpret the source text.
Will this preserve leading zeros?
No, not as part of a numeric value. For codes such as 00058, keep the cell as text if the zeros are meaningful. A numeric custom format can show a fixed number of zeros on screen, but the stored number remains 58 and may not behave like the original code in other systems.
Does converting text change how the number is displayed?
It can change the display because Excel may apply a General format or recognize a date, but conversion and formatting are separate. After confirming the underlying value is correct, use Home > Number Format to choose how it should appear. Check decimal places, currency symbols, and separators before sharing the workbook.
Can I do this in Excel for the web?
Some conversion options may be available from the warning icon, but the full Text to Columns workflow can differ from the Windows desktop app. If the command is missing or the wizard is unavailable, open the workbook in Excel for Microsoft 365 on Windows or use a formula in a neighboring column if supported in your workbook.
Related
- Excel Day Counter: Count Days Between Dates
- Excel Date Difference: Days, Workdays, and Inclusive Counts
- Excel Day Based on Date: Find the Weekday
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Calculate Age in Excel From a Date of BirthTo calculate age in completed years in Excel, put the date of birth in A2 and enter =DATEDIF(A2,TODAY(),"Y")…
- Excel WEEKDAY: Get the Day of the Week from a DateIn Excel, use WEEKDAY to return a number for the day of the week represented by a date.…
- Excel Very Slow Saving Files? Causes and FixesIf Excel is very slow saving files, first save a copy to a local folder and compare the…
- How to Add a Calendar Drop-Down in ExcelTo add a usable date drop-down in Excel for Microsoft 365 on Windows, put a date list on…
- Excel New Row Shortcut: Insert Rows Above or BelowIn Excel for Microsoft 365 on Windows, select the row where you want the new one, then press…
- Excel Insert Row Shortcut: Fast Ways for Windows and MacExcel has no built-in shortcut named “IR.” If you mean insert row, select the row with Shift+Space, then…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.