Files & formats

Circular dependency detected in Google Sheets? Fix the formula reference

The short answer

Click the cell with the error and inspect its formula. A circular dependency occurs when the formula needs its own result to finish, either directly or through other cells. Move the result outside the input range or change the references so they lead to the original data.

Related sourcesGoogle

01Check whether the total includes its own cell

Section link

Suppose the data is in B2 through B12 and the total is in B13. Putting =SUM(B2:B13) in B13 includes the total in its own inputs. Use =SUM(B2:B12) there instead. If you use =SUM(B:B) to include future rows, put that formula in another column, such as D2.

02Follow the references if the loop spans several cells

Section link

Say C2 gets its value from D2, while D2 uses C2 in its formula. Changing where the formulas sit will only help if you also break the loop. Decide which value comes from the original data. Point that formula to the input data, then let the other formula use its result. Check references to other tabs too.

03Keep iterative calculation for intentional loops

Section link

Iterative calculation repeats a circular calculation under limits you set for the spreadsheet. For an ordinary sum or lookup, fix the input references first. Then change an input value and check that the result updates to what you expect.

Sources & further reading