Have you entered a formula, but Excel is not calculating a result?
Every once in a while, you might find Excel behaving in a bizarre or unexpected way. One example is when you accidentally trigger the scroll lock feature. Another example is when one or more formulas suddenly stops working. Instead of a result, you see only a formula, as in the screen below:
The VLOOKUP formula is correct, why no result?
This can be very confusing, and you might think you've somehow broken your spreadsheet. However, it's likely a simple problem. With a little troubleshooting, you can get things working again.
There are two main reasons you might see a formula instead of a result:
- You accidentally enabled Show Formulas
- Excel thinks your formula is text
I'll walk through each case with some examples.
Show Formulas is enabled
Excel has a feature called Show Formulas that toggles the display of formula results and actual formulas. Show Formulas is mean to give you a quick way to see all formulas in a worksheet. However, if you accidentally trigger this mode, it can be quite disorienting. With Show Formulas enabled, columns are widened, and every formula in a worksheet is displayed with no results anywhere in sight, as shown in the screens below.
Show Formulas disabled (normal mode)
Show Formulas enabled
To check if Show Formulas is turned on, visit the Formula tab in the ribbon and check the Show Formulas button:
Show Formulas enabled - just click to disable
The reason Show Formulas can be accidentally enabled is because it has the keyboard shortcut (Control `) that a user might unknowingly type. Try Control ` in a worksheet to see how it works. You'll see you can quickly toggles all formulas on and off.
Show Formulas toggles the display of every formula in a worksheet. If you are having trouble with a single formula, the problem isn't Show Formulas. Instead, Excel probably thinks the formula is text. Read on for more information.
Excel thinks your formula is text
If Excel thinks a formula is just text, and not an actual formula, it will simply display the text without trying to evaluate it as a formula. There several situations that might cause this behavior.
No equal sign
First, you may have forgotten the equal sign. All formulas in Excel must begin with an equal sign (=). If you leave this out, Excel will simply treat the formula as text:
Broken formula example - no equal sign (=)
Space before equal sign
A subtle variation of this problem can occur if there is one or more spaces before the equal sign. A single space can be hard to spot, but it breaks the rule that all formulas must start with an equal sign, so it will break the formula as shown below:
Formula wrapped in quotes
Finally, make sure the formula is not wrapped in quotes. Sometimes, when people mention a formula online, they will use quotes, like this:
In Excel, quotes are used to signify text, so the formula will not be evaluated, as seen below:
Note: you are free to use quotes inside formulas. In this case, the formula above requires quotes around criteria.
In all of the examples above, just edit the formula so it begins with an equal sign and all should be well:
For reference, here is the working formula:
Cell format set to Text
Finally, every once in a while, you might see a formula that is well-formed in every way, but somehow does not display a result. If you run into a formula like this, check to see if the cell format is set to Text.
If so, set the format to General, or another suitable number format. You may need to enter cell edit mode (click into the formula bar, or use F2, then enter) to get Excel to recognize the format change. Excel should then evaluate as a formula.
Tip - Save formula in progress as text
Although a broken formula is never fun, you can sometimes use the "formula as text problem" to your advantage, as a way to save work in progress on a tricky formula. Normally, if you try to enter a formula in an unfinished state, Excel will throw an error, stopping you from entering the formula. However, if you add a single apostrophe before the equal sign Excel will treat the formula as text and let you enter without complaint. The single quote reminds you that the formula has been intentionally converted to text:
Later, you can then come back later to work on the formula again, starting where you left off. See #17 in this list for more info.