Excel shows the formula, not the result: how to fix it
A formula that shows as text instead of a result has one of three causes: a Text format, a space or ' before the =, or Show Formulas. How to fix each.
When Excel shows the formula instead of the result, it is reading the formula as text. There are three causes. The cell was formatted as Text before you typed. There is a space or an apostrophe before the =. Or Show Formulas is on.
Each has a different fix. The first question tells you which one you have.
First: one cell, or every formula on the sheet?
Look at the other formulas on the sheet. If every one of them shows its formula, Show Formulas is on. Skip to cause 3. It is a view setting, and no value is wrong.
If only some cells show a formula, it is cause 1 or 2. These are the ones to worry about.
Why one cell of text is a real problem
Here is an office supplies order. D4 should give 76, but it shows its formula. Row 6 adds up column D.
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Office order | |||
| 2 | Item | Qty | Price | Total |
| 3 | Paper | 4 | 5.50 | 22 |
| 4 | Toner | 2 | 38 | =B4*C4 |
| 5 | Pens | 3 | 6.20 | 18.6 |
| 6 | Sum | 40.6 |
D6 holds =SUM(D3:D5). It gives 40.6. The right total is 116.6.
SUM skips text, so the toner is not counted. There is no error and no warning.
You can test a cell. =ISTEXT(D4) gives TRUE, so D4 holds text.
=ISFORMULA(D4) gives FALSE, and it gives TRUE for D3. ISFORMULA
is in Excel 2013 and later.
Cause 1: the cell was formatted as Text
A cell formatted as Text keeps exactly what you type. That includes a formula. It happens when somebody sets a whole column or sheet to Text first. Often the reason is to keep the 0 at the start of codes like 0042.
To check, click the cell. On the Home tab, the number format box says Text.
Fix one cell: set the format to General. Then click the cell, press F2 and press Enter.
Changing the format alone does nothing. Excel only reads the formula again when you type it again, and F2 then Enter does that.
Fix many cells: select them and set the format to General. Press Ctrl+H. Find = and replace it with =. Click Replace All. Every cell is typed again, and the formulas work.
Cause 2: a space or an apostrophe before the =
A formula must start with =. With a space in front, Excel reads the cell as text. This often happens when you paste a formula from an email, a chat or a web page.
An apostrophe does the same thing, on purpose. Type '=B4*C4 and
Excel keeps it as text. The apostrophe does not show in the cell. You see it in the formula
bar.
Fix: click the cell and press F2. Press Home to go to the start. Delete the space or the apostrophe, then press Enter.
Some people use the apostrophe to show a formula in a note. That is fine, as long as no total reads that cell.
Cause 3: Show Formulas is on
Show Formulas shows the formula in every cell, instead of its result. The columns get wider. Dates show as plain numbers. It is useful when you check a sheet, and confusing when you turn it on by accident.
Fix: press Ctrl+` on Windows. On a US keyboard, ` is the key above Tab. Press it again to switch back.
Or go to the Formulas tab and click Show Formulas. When the button is highlighted, the setting is on.
Nothing is wrong with the values here. D6 still holds 116.6. Only the view changed. The setting belongs to one sheet, so the other sheets in the file may look normal.
A different problem: the result is old
Sometimes the formula is fine and shows a number. But the number does not change when you change the data. That is not text. Calculation is set to Manual.
Look at the status bar at the bottom. It says Calculate when results are out of date. Press F9 to work them out now.
To fix it for good, go to Formulas, then Calculation Options, and choose Automatic. A file saved in Manual mode can switch your Excel to Manual. So check this after you open a file from somebody else.
Questions people ask
I changed the format to General. Why does it still show the formula?
The format only changes how Excel treats what you type next. The cell still holds text. Press F2 and then Enter to type it again.
Why does my formula show as text only in one column?
That column was formatted as Text. This is cause 1. Set the column to General first, then fix the cells.
How do I show one formula as text on purpose?
Put an apostrophe before the =. Or use =FORMULATEXT(D3) in
another cell. It shows the formula in D3 as text.
New to formulas? Start with how to write an Excel formula. For more on F2, see edit cells faster. If numbers are stuck as text, not formulas, read numbers stored as text. The lessons below are real sheets you type into, and each answer is checked when you press Enter.