What Evaluate Formula does
Evaluate Formula shows a formula one step at a time. Each step works out one part and shows its result in place, so you can see how the final answer is built. It doesn’t change the formula or the cell.
Open the tool
- Click the cell that holds the formula.
- Go to Formulas > Evaluate Formula.
- In the dialog, the part of the formula that will be calculated next is underlined.
Step through the formula
The dialog has five buttons:
- Evaluate calculates the underlined part and shows the result in its place.
- Step In opens the next nested function, so you can evaluate its parts.
- Step Out returns you to the outer level.
- Restart goes back to the start of the formula.
- Close ends the session.
Example: a nested IF
Suppose B2 holds 72, and C2 contains:
=IF(B2>90,"A",IF(B2>60,"B","C"))
Stepping through it looks like this:
- The first part to calculate is B2, which gives 72.
- Next,
72>90gives FALSE. - Because the first test failed, the outer IF moves to its second branch, which is the inner IF. Its test,
72>60, gives TRUE. - The inner IF returns “B”, so the formula’s result is B.
The exact order of the underlines can vary a little, but the steps always follow the logic of the formula. If nesting is new to you, how to write nested if formulas in excel explains the structure.
Check one part with F9
For a quick look at a single part, without the dialog:
- Click in the formula bar and select the part you want to check, such as
B2>60. - Press F9. Excel shows the value of that part, such as TRUE.
- Press Esc to cancel. Do not press Enter, because that keeps the value in place of the formula.
When it helps
- An IF returns the wrong branch. Stepping through shows which test passed and which failed. why is my if formula not working in excel covers similar problems.
- A lookup returns an error or the wrong row. You can see the value the formula actually searched for.
- Text and numbers are mixed. Each part shows what it really returns, which can expose a number stored as text.
- An error you don’t recognize. Stepping through can show which part produced it. excel formula error messages explained lists the common ones.
What it doesn’t show
Evaluate Formula shows the calculation, not which cells the formula refers to. For that, use Trace Precedents, which is explained in how to trace precedents in excel.