Excel will not change the number format of a cell because the cell contains a value that the selected format cannot represent, or because the cell is locked and protected, or because the data is actually text disguised as a number. The quickest fix is to use the Text to Columns feature to force a conversion, or to clear the contents and re-enter the data as the correct type.
What You'll Need
- A computer with Microsoft Excel installed (Office 2016 or newer is recommended for the most stable interface).
- Access to the spreadsheet containing the stubborn data.
Step-by-Step
Follow these steps in order. If the first method fails, proceed to the alternatives listed below. The steps below are for Excel on Windows, but the logic applies to the Mac version with minor interface differences.
- Identify the data type. Look at the cell content. If the number has a leading apostrophe (e.g.,
'1234), a leading zero, or if the cell is left-aligned by default, it is likely text. If the number is right-aligned but the format is General, the issue is usually that the number is too long for the General format or contains special characters. - Use the Text to Columns tool. This is the most reliable method to force Excel to treat data as a number. Select the column or range of cells that will not format correctly. Go to the Data tab on the ribbon and click the Text to Columns button. Click Finish immediately on the first screen of the wizard (Delimited). This process resets the parsing data and often forces a conversion.
- Check for apostrophes. Inspect the formula bar for a leading apostrophe ('). This character is invisible to the user but tells Excel to treat the entry as text. To remove it, click into the cell, place the cursor right before the first character, press Backspace, and then press Enter. The apostrophe will disappear, and the number should become usable for calculations.
- Try the 'General' format reset. Sometimes a format is corrupted. Select the cells, right-click, and choose Format Cells. Click the Number category, select General, and click OK. Then, select the cells again, choose Format Cells again, and select the specific format you want (e.g., Number, Currency, or Date). This forces the application to re-evaluate the cell's content against the new format rules.
- Use the Paste Special Multiply trick. If the data is numeric but Excel refuses to format it as such, you can trick Excel into recognizing it. Enter the number 1 into an empty cell. Copy that cell. Select the range of data that will not change. Right-click and choose Paste Special. Choose the Multiply operation and click OK. This mathematically converts the text to a number while keeping the original value.
- Check for hidden characters. Sometimes numbers are imported from web pages or other sources and contain non-breaking spaces or other invisible characters. Copy a working number from another cell and paste it over the top of the problem cell. If the formatting changes immediately, the original cell contained corrupt data. You can use the Find & Replace function (Ctrl+H) to look for specific invisible characters if you know them.
- Verify cell protection. If you are the only one editing the sheet, this is unlikely, but if the format is locked, you cannot change it. Go to the Home tab, click the Format dropdown in the Cells group, and choose Lock Cell. If it is already locked, uncheck it. Then, go to the Review tab and ensure the Protect Sheet button is not active, or unlock the specific cells you need to edit.
Common Mistakes
Users often try to force a change by applying the format repeatedly. Clicking the Number Format dropdown multiple times will not fix a text entry. Another frequent error is trying to format a date before the data is actually a date. If you type 13-12-2024 but the cell is set to text, changing the format to Date will result in an error or a different date interpretation, depending on your regional settings.
Tips
When importing data from CSV files, Excel often misinterprets leading zeros (e.g., 00123 becomes 123 and loses the zero). To preserve leading zeros, save the CSV file as a Text file or change the import settings to treat that column as text before importing. Always check the formula bar to see the actual value of the cell, not just what is displayed on the screen.
Troubleshooting
If you have followed the steps above and the number still will not format correctly, the issue may be deeper than a simple setting. If the data is linked to an external database or an online data source, the refresh process might be overwriting your manual formatting changes. In this case, you may need to edit the connection properties or format the cells after every refresh. If the cell contains a formula that results in text (such as using the TEXT function), you cannot change the format of the result; you must change the formula itself to return a numeric value. Finally, if the workbook is extremely large and slow, try saving it as a newer file format (like .xlsx instead of .xls) to ensure the application has not become unstable during the operation.
Frequently Asked Questions
Why does Excel keep changing my dates to numbers?
Excel stores dates as sequential serial numbers so they can be used in calculations. If you type a date that Excel does not recognize (e.g., 12/25/24 in a region that uses dd/mm/yy), it will convert it to a number or an error. Ensure your system date format matches the format you are typing.
How do I stop Excel from turning long numbers into scientific notation?
When a number is longer than 11 digits, Excel automatically switches to scientific notation. To keep the full number, change the format of the cell to Text before typing the number, or wrap the number in quotes (e.g., ="12345678901234567890") in a formula.
Can I format an entire column at once?
Yes. Select the header of the column (the letter at the top) to select the entire column. Then, right-click and choose Format Cells. This will apply the format to every cell in that column without affecting other parts of the sheet.
What is the difference between General and Number format?
The General format is the default and adapts to the data (it shows dates as dates and numbers as numbers). The Number format forces the display of decimal places and specific separators, regardless of the data type.
Why is my number right-aligned but still considered text?
Numbers are usually right-aligned by default. If it is right-aligned but treated as text, it likely has an invisible character like a space or a non-breaking space at the beginning or end. The Text to Columns method is the best way to strip these characters.