Back to blog
2 min read

Google Sheets Says Circular Dependency. Here's the 60-Second Way to Find the Loop

Someone sends you a model, a cell says #REF!, and the tooltip says "Circular dependency detected." Sheets knows a loop exists. It will not show you the chain. Here is how I find it in about a minute.

J

Jake Bennatt

I work in google sheets and stuff. Built XLkeys to make my job easier. You should try it, its free.

Someone sends you their model, or you inherit one, and a cell is showing #REF!. Hover it and Sheets says "Circular dependency detected." So Sheets did its job: it knows a loop exists. What it will not do is draw the chain. In Excel you would hit Trace Precedents and follow the arrows back around. Sheets has no arrows, no auditing pane, nothing.

Finding the Loop

Start on the #REF! cell and run Trace Precedents with Ctrl + Shift + [ (Cmd + Shift + [ on Mac). XLKeys lists every cell the formula reads, including cells on other tabs. Arrow down to an input, press Enter to jump to it, and run the trace again. Keep stepping until you land on a cell you already visited. That is your loop, and it is usually only two or three cells long.

Escape puts you back on the cell you started from, so you can wander without losing your place. If it is easier to work the other direction, Trace Dependents does the reverse: Ctrl + Shift + ] shows every formula that reads the current cell. Both traces are XLKeys Pro, with a 30 day free trial and no card.

Accident or Real Plug?

Nine times out of ten the loop is an accident. The classic is a subtotal that sums its own row: SUM(C2:C20) sitting in C15, or a formula dragged one row too far so it picks itself up. Fix the range and the #REF! clears instantly.

Sometimes the loop is real. Three-statement models have a genuine circularity: interest expense depends on debt, debt depends on cash flow, and cash flow depends on interest expense. If that is what you traced, do not break it. Turn on iterative calculation instead: File > Settings > Calculation, set Iterative calculation to On, and Sheets will converge the loop the way Excel does.

Once the loop is fixed, one more keystroke tells you if the model has other surprises: Auto Color (Ctrl + Shift + S) colors hardcodes blue and formulas black, so a number typed over a formula stands out immediately.

Install XLKeys, click the #REF! cell, press Ctrl + Shift + [. The loop is almost never more than three cells.

Make Google Sheets feel like Excel

Install XLKeys to use Excel-style shortcuts, Alt-key sequences, formula auditing, Goal Seek, Sensitivity Tables, and Workbook Health audits in Google Sheets.

Add XLKeys to Chrome