Numbers in Excel will not calculate if they are formatted as text, entered with a leading apostrophe, or if the calculation mode is set to manual. The most common fix is to force the cell format back to General or Number, or to press F9 to update the sheet. Below is a detailed guide to diagnosing and correcting this issue.
What You'll Need
- A computer with Microsoft Excel installed.
- Basic knowledge of navigating spreadsheet cells.
Step-by-Step
- Identify the problem cells. Click on a cell that displays a number but returns a result of
#VALUE!or simply displays the raw numbers without a sum, average, or multiplication result. Look at the top-left corner of the cell; if the text alignment is left-aligned instead of right-aligned, the data is likely stored as text. - Check for leading spaces. Sometimes numbers are stored as text because there is an invisible space at the start or end of the entry. Click inside one of the problem cells and press the Home key followed by the Delete key. This removes any trailing spaces. If the value is now treated as a number, the issue was the invisible space.
- Use the 'Text to Columns' feature. This is the most effective way to convert a block of text-formatted numbers back into numbers without changing the visible data.
- Highlight the range of cells containing the numbers that are not calculating.
- Go to the Data tab on the ribbon.
- Click the Text to Columns button in the Data Tools group.
- In the first step of the wizard, select Delimited and click Next.
- On the second step, ensure no delimiters (like commas or tabs) are checked. Click Next.
- On the third step, click the column data format button and select General. Click Finish.
- Check the calculation mode. Excel often defaults to Manual calculation mode when a large dataset is loaded, or if a file was saved in Manual mode. To check this and switch it back to Automatic:
- Go to the Formulas tab on the ribbon.
- In the Calculation group, click the dropdown arrow next to Calculate Now.
- Select Calculate Now to update all open workbooks, or Calculate Sheet to update only the current worksheet.
- Remove leading apostrophes. If a user types an apostrophe (
') before a number (e.g.,'100), Excel treats it as text to preserve the leading zero. To fix this:- Click inside a cell with a leading apostrophe.
- Press F2 to enter Edit mode.
- Press Backspace or Delete until the apostrophe is gone.
- Press Enter.
- Force a calculation using a formula. If the numbers are truly raw data and not part of a table, you may need to use a helper formula to convert them. In an adjacent column, type the formula
=VALUE(A1)(assuming the data is in cell A1). Drag this formula down. This converts the text string into a numerical value. You can then copy these results, use Paste Special > Values to replace the original text column with the numbers, and delete the helper column. - Verify the formula syntax. If the issue is with a formula itself, ensure the math operators are correct. Check for missing parentheses, like entering
=SUM(A1:A10instead of=SUM(A1:A10). Excel will return a#NAME?or#VALUE!error if the syntax is incorrect.
Common Mistakes
One of the most frequent mistakes users make is assuming that simply changing the font color or cell background color will fix the calculation. Visual formatting does not change the underlying data type. Another mistake is trying to multiply or add text-formatted numbers directly without converting them first, which results in the #VALUE! error. Users also often forget to update the calculation mode if they have previously switched it to Manual, leading them to believe the software is broken when it is simply waiting for an instruction.
Tips
- Inspect the error value. If a cell shows an error code like
#VALUE!, hovering over the cell will often display a tooltip explaining exactly why it failed, such as "A value used in the formula is of the wrong data type." - Use the Format Cells dialog. If the Text to Columns method fails, right-click the cell, select Format Cells, and choose Number. This sometimes overrides the text format, though it does not always work if the data was entered with an apostrophe.
- Check for invisible characters. Sometimes data copied from websites or other applications contains non-breaking spaces or other Unicode characters that look like spaces but are not. The TRIM function (
=TRIM(A1)) can remove standard spaces, but specialized cleaning is sometimes required for these invisible characters.
Troubleshooting
If you have followed the steps above and the numbers still will not calculate, proceed with the following checks:
- Check for circular references. Go to the Formulas tab and click Error Checking. If there is a circular reference, it means a formula is trying to calculate its own result, creating an infinite loop. Excel will usually highlight the cell in red, and you must adjust the formula to remove the dependency.
- Verify workbook protection. If the worksheet is protected, you cannot edit cells or change formulas. Go to the Review tab and click Unprotect Sheet to test if this is the issue. You will need the password to make permanent changes.
- Check if the file is corrupted. If only one specific workbook is behaving strangely while others work fine, the file may be corrupted. Open a new blank workbook, copy the data from the old one into the new one, and see if the calculations work.
- Disable Add-ins. Sometimes third-party Excel add-ins (like specific analysis tools or plugins) can interfere with calculation logic. Go to File > Options > Add-ins, select COM Add-ins, and uncheck any boxes to disable them temporarily.
Frequently Asked Questions
- Why are my numbers showing up as hashtags (#)? Excel displays hashtags when a cell is too narrow to show the value. This is purely a display issue, not a calculation issue. Double-click the column border to auto-fit the column width.
- Why does the SUM function return 0? This usually happens because the cells are formatted as text. Even if they look like numbers, Excel cannot sum them. Use the Text to Columns method mentioned above to convert them back to numbers.
- How do I convert multiple columns of numbers at once? You can highlight all the columns containing text numbers, go to Data > Text to Columns, and choose General as the final format. This applies the conversion to the entire selection simultaneously.
- Does changing the cell format from Text to Number work? Sometimes, but not always. If the data was entered with a leading apostrophe, changing the format will not change the underlying data type. You must delete the apostrophe or use the Text to Columns feature to force the conversion.
- Why is the calculation mode set to Manual? Excel may default to Manual mode when a file is saved that way, or when the calculation is disabled for performance reasons on very slow computers. You can switch it back to Automatic in the Formulas tab.