Sub topic 2
Stepping through a formula with Evaluate Formula
This chapter assumes you can write Excel formulas with cell references, use absolute and relative references, move between worksheets, and read a three-statement model layout.
Stepping through a formula with Evaluate Formula
Evaluate Formula shows one part of a formula at a time. Select the cell, then choose Formulas > Evaluate Formula. Each click on Evaluate replaces the next underlined reference with its current value and computes that part. Consider this formula in E20:
=D20*(1+E12)If D20 holds 1,000 and E12 holds 0.05, the tool shows 1,000 * (1 + 0.05) and then 1,050. Look for the step where the value stops making sense. Evaluate Formula does not change the workbook.
Reading Excel error values
An error value is a result that begins with #. Common errors and their usual causes:
| Error | Usual cause |
|---|---|
| #DIV/0! | A formula divides by zero or a blank cell |
| #REF! | A formula points to a deleted cell |
| #N/A | A lookup finds no match |
| #VALUE! | Text is used in arithmetic |
| #NAME? | Excel does not recognize a function or range name |
Errors spread. One error in an input flows into every dependent cell. A guard such as the following returns #N/A instead of #DIV/0!, which makes the problem easier to trace:
=IF(C12=0, NA(), D12/C12)Finding the source of an error with Trace Error
Select an error cell and choose Formulas > Error Checking > Trace Error. Excel draws arrows to the cell that caused the error. Repeat the step on each precedent until you reach the original cause. Choose Remove Arrows to clear the lines.
Error-checking rules and what the green triangles mean
Excel marks suspicious cells with a green triangle. You can turn individual rules on or off under File > Options > Formulas. Common flags include:
- Inconsistent formula: the formula differs from its neighbors in the region.
- Number stored as text: a number was entered as text.
- Formula omits adjacent cells.
- Formula refers to empty cells.
A triangle is a warning, not proof of an error. Check each one before you clear it.
Finding hardcoded numbers inside formula rows
A hardcoded number is a typed value where a formula should be. Enter this check in a spare cell to count non-formula cells in row 20:
=SUMPRODUCT(--NOT(ISFORMULA(D20:N20)))A result of 0 means every cell is a formula. To find the typed values, select the row, then use Home > Find & Select > Go To Special > Constants.
> Note: the callout below is a fenced block, not a quote.
Exercise
Cell H20 holds a typed 0.08, while its neighbors are formulas. Which formula check flags it, and which Go To Special option selects it?
Show answer
The check =SUMPRODUCT(--NOT(ISFORMULA(D20:N20))) returns a count above 0. Go To Special > Constants selects H20 because it holds a typed value.