Sub topic 3
Diagnosing circular references
This chapter assumes you can write Excel formulas with absolute and relative references, read a three-statement model, and use Trace Precedents. A circular reference is a formula that depends, directly or through other cells, on its own result.
Diagnosing circular references
When Excel finds a loop, it shows a warning. Open Formulas > Error Checking > Circular References to see the address of one cell in the loop. Then trace precedents from that cell to map the full loop.
Next, decide whether the loop is intended. Interest calculated on an average debt balance is a common intended loop: interest depends on the closing balance, which depends on cash flow, which depends on interest. An unintended loop often comes from a total whose range includes its own cell.
If the loop is intended, enable iterative calculation under File > Options > Formulas, set a maximum iteration count, and add a circuit breaker: an input cell that sets the interest to zero when it equals 1. If the loop is unintended, fix the formula. Do not leave iterative calculation on to hide the warning.
What tracing cannot see
Trace Precedents follows direct references only. It cannot follow INDIRECT or OFFSET, because these build their references from text or calculations at run time. It also stops at external links to other workbooks. Named ranges can hide references, so check Formulas > Name Manager.
> Note: Treat any cell that uses INDIRECT, OFFSET, or an external link as unverified until you check it by hand.
Building integrity checks into the model
Place checks where you can see them. Each check should return 0 when the model is healthy.
=ROUND(Total_Assets - (Total_Liabilities + Total_Equity), 2)
=SUMPRODUCT(--ISERROR(C5:N80))
=IF(AND(Check_Balance=0, Check_Cash=0, Check_Errors=0), "OK", "CHECK MODEL")The first formula tests the balance sheet, the second counts error cells, and the third combines them into one status flag.
Monitoring key cells with the Watch Window
Select a key output cell, then choose Formulas > Watch Window > Add Watch. The window lists each watched cell with its value, formula, and sheet. Watched cells stay visible while you edit inputs on other sheets, so you can confirm that a circuit breaker or input change moves the check cells as expected.
Putting it together: an audit workflow and findings log
- Confirm the master check reads OK and the error count is 0.
- Find circular references and classify each loop as intended or unintended.
- Trace precedents for each output, noting any INDIRECT, OFFSET, or external links.
- Run the ISFORMULA count across each formula row to find hardcoded values.
- Record each finding in a log.
| Sheet | Cell | Issue | Severity | Status |
|---|---|---|---|---|
| CashFlow | F20 | Hardcoded 0.05 in formula row | High | Open |
Exercise:
Exercise
In the row D20:N20, every cell holds a formula except F20, which holds a typed number. Which check flags it, and what does it return?
Show answer
The check =SUMPRODUCT(--NOT(ISFORMULA(D20:N20))) returns 1, because exactly one cell in the range is a constant rather than a formula.