How to find and fix a circular reference in Excel

A circular reference is a formula that depends on its own result. The total below adds a range that includes the total.

The workbook where a closing cash balance can point at itself is the cash flow forecast.

Find the cell

On the Formulas tab, open Error Checking and then Circular References. Excel lists the cell. The status bar names it too, once you dismiss the warning. Trace Precedents, on the same tab, draws the arrow. In this sheet the arrow points from the total back into the total.

Why the cell shows 0

SUM
=SUM(B2:B6)
=SUM(B2:B6)B6
The total includes itself
AB
1MonthBill
2Jan143.60
3Feb96.20
4Mar118.45
5Apr88.10
6Total0
A picture with iteration off. The formula adds B2 through B6, and B6 is the formula. Excel shows 0 and flags a circular reference. The four bills still add to $446.35.

The four bills are the ones on the SUBTOTAL page. 143.60 + 96.20 = 239.80. 239.80 + 118.45 = 358.25. 358.25 + 88.10 = 446.35. None of that arithmetic runs while the formula also asks for B6, because B6 is waiting on itself.

With iterative calculation left off, Excel shows 0. That 0 is not the sum. It is the value Excel leaves in a circular cell it will not finish.

Stop including the total

SUM
=SUM(B2:B5)
=SUM(B2:B5)B6
The total stays outside the range
AB
1MonthBill
2Jan143.60
3Feb96.20
4Mar118.45
5Apr88.10
6Total446.35
A picture of the fix. The range is B2:B5. 143.60 + 96.20 + 118.45 + 88.10 = 446.35. The warning goes away.

=SUM(B2:B5) is the same four cells and not the formula. The result is $446.35, and the circular-reference entry disappears from Error Checking.

An indirect loop is the same mistake one cell further away. If B7 equals B6, and B6 adds B2:B7, each cell waits on the other. Move the total outside every range that feeds it.

IFERROR does not fix it

IFERROR replaces an error value such as #VALUE! or #N/A. A circular cell showing 0 has not returned an error value.

IFERROR
=IFERROR(SUM(B2:B6),"Check the range")
=IFERROR(SUM(B2:B6),"Check the range")B6
IFERROR does not break the loop
AB
1MonthBill
2Jan143.60
3Feb96.20
4Mar118.45
5Apr88.10
6Total0
A picture of the same loop wrapped in IFERROR. The cell still shows 0. Zero is not an error value, so the message Check the range never appears. The circular-reference warning stays.

The message in the second argument never appears. The warning stays. Wrapping the formula hides nothing.

Iterative calculation, under File, Options, Formulas, is the switch for a model that is circular on purpose. Leave it off for a bill total. Turning it on to silence this warning makes the 0 look like a finished sum, and the four bills are still $446.35.


Template for this article

13-Week Cash Flow Forecast

More from the blog