Sub topic 5
Stepping Through a Formula with Evaluate Formula
This chapter assumes you can write basic Excel formulas, use relative and absolute references, navigate a three-statement model, and understand named ranges. You will use Evaluate Formula to inspect how Excel calculates one formula step by step.
Why Evaluate Formula matters
A formula can look correct while using the wrong input, an unexpected error value, or a calculation order you did not expect. Evaluate Formula is an Excel auditing tool that replaces parts of a formula with their current results. You can watch the calculation progress one operation at a time.
Use it when:
- A formula returns an unexpected value.
- A nested
IF,SUM, or lookup is difficult to read. - You need to confirm which branch of a condition Excel uses.
- You are tracing an error before changing the model.
Evaluate Formula shows the calculation inside one cell. Trace Precedents shows relationships between cells. Use the two tools together when the formula itself and its input cells both need review.
A worked example
Suppose cell E20 contains this formula:
=IF(C12=0,NA(),D12/C12)The formula checks whether C12 is zero. If it is zero, the formula returns #N/A. Otherwise, it divides D12 by C12.
To inspect it:
- Select cell
E20. - Open the Formulas tab.
- In Formula Auditing, select Evaluate Formula.
- Review the formula shown in the dialog.
- Select Evaluate to replace the next part with its result.
- Continue selecting Evaluate until the final result appears.
- Select Restart to begin again, or Close when finished.
If C12 contains 0, the first condition evaluates to TRUE. Excel then evaluates NA() and returns #N/A. This is intentional in the example. The error signals that a ratio cannot be calculated, instead of presenting a misleading zero.
If C12 contains 100 and D12 contains 25, Excel evaluates the condition as FALSE, then calculates 25/100, producing 0.25.
Reading the evaluation sequence
The dialog reveals the order in which Excel evaluates nested expressions. For example:
| Formula part | Result | What to check |
|---|---|---|
| `C12=0` | `FALSE` | Is the denominator tested correctly? |
| `D12/C12` | `0.25` | Are the numerator and denominator correct? |
| `IF(FALSE,NA(),0.25)` | `0.25` | Did Excel select the intended branch? |
When the displayed expression contains a cell reference, use Evaluate to inspect its value. If a reference points to another formula, Excel may show that formula's result rather than exposing every dependency. Use Trace Precedents or select the referenced cell and evaluate it separately for deeper investigation.
Common evaluation problems
An evaluation sequence can expose several problems:
- A relative reference shifted into the wrong period.
- A denominator of zero causing
#DIV/0!. - Text stored in a numeric cell causing
#VALUE!. - A lookup returning
#N/Abecause the key is missing. - A condition selecting the wrong branch because a comparison uses the wrong sign.
- A named range referring to an unexpected worksheet or range.
Do not replace an error with IFERROR merely to make the output look clean. First identify why the error occurred. Suppressing it can hide a broken model.
A repeatable diagnostic path
Record the cell, the observed result, the evaluation step that exposed the problem, and the recommended correction. This creates an audit trail instead of relying on memory.
Exercise
Cell E20 contains =IF(C12=0,NA(),D12/C12). C12 is 0 and D12 is 50. What should Evaluate Formula reveal, and why is #N/A preferable to a zero?
Show answer
It should show C12=0 evaluating to TRUE, followed by NA() returning #N/A. The error makes the invalid ratio visible; a zero could be mistaken for a valid result.