Excel Formula Returns Text of Formula: How to Fix It
In this article
If a cell shows the formula itself as text instead of calculating a result, the cell is almost certainly formatted as Text, or the formula was typed with a leading apostrophe or equals sign that Excel treated as literal. Set the cell format to General, re-enter the formula, and it will calculate. The same symptom also appears when Show Formulas is switched on, when the workbook is set to Manual calculation, or when the formula sits inside quotes.
What You'll Need
- Excel for Windows, Excel for Mac, or Excel for the web (labels differ slightly by version, device and region).
- The workbook containing the cell that shows the formula as text.
- Edit permission on the workbook, or a copy you can change.
Step-by-Step
- Check whether Show Formulas is on. Press Ctrl+` (the grave accent key, usually under Esc) on Windows, or Cmd+` on Mac. This toggles the Show Formulas view. If every formula in the sheet suddenly displays as text, this is the cause. Press the shortcut again to turn it off. You can also find the toggle on the Formulas tab in the Formula Auditing group, where it is labelled Show Formulas.
- Look at the cell format. Select the cell and check the number format box on the Home tab. If it reads Text, that is the problem. Change it to General, then press F2 and Enter to re-enter the formula. Changing the format alone does not convert an existing text entry; the formula must be re-entered or refreshed.
- Remove a leading apostrophe. A cell that begins with an apostrophe stores everything after it as literal text. Click the cell, look in the formula bar, and delete the apostrophe if present. Press Enter.
- Check for a leading space or stray character. If the formula bar shows a space before the equals sign, or the equals sign is missing, Excel treats the entry as text. Delete the space or add the equals sign at the start.
- Confirm the cell is not wrapped in quotation marks. A formula typed as
"=SUM(A1:A5)"with quotes around it is text. Remove the outer quotes. - Check the calculation mode. Go to the Formulas tab and look at Calculation Options. If it is set to Manual, formulas will not recalculate until you press F9. Set it to Automatic. On Excel for the web the option is in the same place.
- Re-enter the formula cleanly. Delete the cell contents, set the format to General first, then type the formula and press Enter. This avoids the common trap of formatting a cell as Text before typing.
- Convert a whole column at once. If many cells are affected, select the column, set the format to General, then use Data > Text to Columns and click Finish without changing any options. This forces Excel to re-evaluate each cell. Save a copy first, because Text to Columns rewrites the selected cells.
- Check for a hidden apostrophe from imported data. Data pasted from CSV files or web pages often carries a leading apostrophe. Use Find and Replace (Ctrl+H) to search for the apostrophe at the start of cells, or re-import the data with the correct column format.
- Verify the formula is not inside a text function. If the cell contains something like
=TEXT(A1,"0")or a formula built with&and quotes, it will return text by design. That is expected behaviour, not a fault.
Common Mistakes
- Changing the format to General but not re-entering the formula. The cell keeps its text value until it is edited.
- Formatting an empty column as Text before typing formulas. Set the format to General first, then enter the formulas.
- Confusing Show Formulas with a broken workbook. The toggle affects the whole sheet, not one cell.
- Leaving calculation on Manual after opening a large workbook. Formulas look stale or show as text until F9 is pressed.
- Pasting formulas from a website or chat message that includes invisible characters. Paste as plain text, then retype the equals sign.
Tips
- Press Ctrl+` again if the sheet flips back to showing formulas; it is a toggle, not a one-way switch.
- Use the formula bar to inspect exactly what is stored in the cell, including leading spaces and apostrophes.
- When importing CSV data, set the column format to General in the import wizard rather than Text.
- Keep a backup copy before using Text to Columns or Find and Replace across a large range.
- If only one cell misbehaves, copy a working formula from a neighbouring cell and paste it in, then adjust the references.
Troubleshooting
If the cell still shows text after these steps, work through the following in order, simplest first.
- Close and reopen the workbook. This clears a stuck calculation state.
- Check that the workbook is not in a protected view or read-only mode, which can block recalculation. Look at the title bar for a warning banner.
- Press F9 to force a full recalculation if calculation is set to Manual.
- Select the cell and press Ctrl+Shift+Enter only if the formula is an array formula in an older version; in modern Excel, dynamic arrays do not need this.
- If the file was created in another program, open it in Excel and use Save As to a native .xlsx format, then re-enter the affected formulas.
- As a last resort, copy the sheet contents to a new workbook using Paste Special > Values for the affected cells, then retype the formulas. This deletes the original formulas, so keep a backup.
If none of this works, the formula may be malformed. Check for mismatched parentheses, a missing comma between arguments, or a function name that does not exist in your version of Excel.
Frequently Asked Questions
Why does Excel show the formula instead of the result?
Usually because the cell is formatted as Text, the formula has a leading apostrophe, or Show Formulas is enabled. Fix the format and re-enter the formula.
How do I turn off Show Formulas?
Press Ctrl+` on Windows or Cmd+` on Mac, or use the Show Formulas button on the Formulas tab.
Will changing the format to General fix existing cells?
No. You must re-enter the formula or use Text to Columns to force Excel to re-evaluate the cell.
Why does a formula work in one cell but not another?
The failing cell is likely formatted as Text or contains a hidden character. Compare the formula bar contents of both cells.
Can I convert a whole column from text formulas to real formulas?
Yes. Set the column to General, then use Data > Text to Columns and click Finish. Back up the file first.
Does this happen in Excel for the web too?
Yes. The same causes apply, though menu labels and shortcut keys can differ slightly by version and region.