Excel can find circular reference

You’ve entered a formula, but it’s not working. Instead, you’ve got this message about a “circular reference.” Millions of people have the same problem and it happens because your formula is trying to calculate itself. Here’s what it looks like:

A formula that will cause a circular reference

The formula =D1+D2+D3 breaks because it lives in cell D3, and it’s trying to calculate itself. To fix the problem, you can move the formula to another cell. Press Ctrl+X to cut the formula, select another cell, and press Ctrl+V to paste it.

Tips: 

  • At times, you may want to use circular references because they cause your functions to iterate. If this is the case, jump down to Learn more about iterative calculation.

  • Also, see Overview of formulas in Excel to learn more about writing formulas.

Another common mistake is using a function that includes a reference to itself; for example, cell F3 contains =SUM(A3:F3). Here’s an example:

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

You can also try one of these techniques:

  • If you just entered a formula, start with that cell and check to see if you refer to the cell itself. For example, cell A3 might contain the formula =(A1+A2)/A3. Formulas like =A1+1 (in cell A1) also cause circular reference errors.

While you’re looking, check for indirect references. They happen when you put a formula in cell A1, and it uses another formula in B1 that in turn refers back to cell A1. If this confuses you, imagine what it does to Excel.

  • If you can’t find the error, click the Formulas tab, click the arrow next to Error Checking, point to Circular References, and then click the first cell listed in the submenu.

    The Circular References command

  • Review the formula in the cell. If you can’t determine whether the cell is the cause of the circular reference, click the next cell in the Circular References submenu.

  • Continue to review and correct the circular references in the workbook by repeating steps any or all of the steps 1 through 3 until the status bar no longer displays «Circular References.»

Tips    

  • If you’re brand new to working with formulas, see Excel 2016 Essential Training at LinkedIn Learning.

  • The status bar in the lower-left corner displays Circular References and the cell address of one circular reference.

    If you have circular references in other worksheets, but not in the active worksheet, the status bar displays only “Circular References” with no cell addresses.

  • You can move between cells in a circular reference by double-clicking the tracer arrow. The arrow indicates the cell that affects the value of the currently selected cell. You show the tracer arrow by clicking Formulas, and then click either Trace Precedents or Trace Dependents.

    Tracing precedents

Learn about the circular reference warning message

The first time Excel finds a circular reference, it displays a warning message. Click OK or close the message window.

When you close the message, Excel displays either a zero or the last calculated value in the cell. And now you’re probably saying, «Hang on, a last calculated value?» Yes. In some cases, a formula can run successfully before it tries to calculate itself. For example, a formula that uses the IF function may work until a user enters an argument (a piece of data the formula needs to run properly) that causes the formula to calculate itself. When that happens, Excel retains the value from the last successful calculation.

If you suspect you have a circular reference in a cell that isn’t showing a zero, try this:

  • Click the formula in the formula bar, and then press Enter.

Important    In many cases, if you create additional formulas that contain circular references, Excel won’t display the warning message again. The following list shows some, but not all, the scenarios in which the warning message will appear:

  • You create the first instance of a circular reference in any open workbook

  • You remove all circular references in all open workbooks, and then create a new circular reference

  • You close all workbooks, create a new workbook, and then enter a formula that contains a circular reference

  • You open a workbook that contains a circular reference

  • While no other workbooks are open, you open a workbook and then create a circular reference

Learn about iterative calculation

At times, you may want to use circular references because they cause your functions to iterate—repeat until a specific numeric condition is met. This can slow your computer down, so iterative calculations are usually turned off in Excel.

Unless you’re familiar with iterative calculations, you probably won’t want to keep any circular references intact. If you do, you can enable iterative calculations, but you need to determine how many times the formula should recalculate. When you turn on iterative calculations without changing the values for maximum iterations or maximum change, Excel stops calculating after 100 iterations, or after all values in the circular reference change by less than 0.001 between iterations, whichever comes first. However, you can control the maximum number of iterations and the amount of acceptable change.

  1. Click File > Options > Formulas. If you’re using Excel for Mac, click the Excel menu, and then click Preferences > Calculation.

  2. In the Calculation options section, select the Enable iterative calculation check box. On the Mac, click Use iterative calculation.

  3. To set the maximum number of times that Excel will recalculate, type the number of iterations in the Maximum Iterations box. The higher the number of iterations, the more time that Excel needs to calculate a worksheet.

  4. In the Maximum Change box, type the smallest value required for iteration to continue. This is the smallest change in any calculated value. The smaller the number, the more precise the result and the more time that Excel needs to calculate a worksheet.

An iterative calculation can have three outcomes:

  • The solution converges, which means a stable end result is reached. This is the desirable condition.

  • The solution diverges, which means that from iteration to iteration, the difference between the current and the previous result increases.

  • The solution switches between two values. For example, after the first iteration the result is 1, after the next iteration the result is 10, after the next iteration the result is 1, and so on.

Top of Page

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

Get live and free answers on Excel

Tip: If you’re a small business owner looking for more information on how to get Microsoft 365 set up, visit Small business help & learning.

See also

Excel 2016 Essential Training

Overview of formulas in Excel

How to avoid broken formulas

Find and correct errors in formulas

Excel keyboard shortcuts and function keys

Excel functions (alphabetical)

Excel functions (by category)

Содержание

  • Что такое круговая ссылка в Excel?
  • Как найти круговые ссылки в Excel?
  • Как удалить круговую ссылку в Excel?
  • Как включить / отключить итерационные вычисления в Excel
  • Умышленное использование круговых ссылок

При работе с формулами Excel вы можете иногда увидеть следующее предупреждение.

Это приглашение сообщает вам, что на вашем листе есть циклическая ссылка, и это может привести к неправильному расчету по формулам. Он также просит вас решить эту проблему с циклическими ссылками и отсортировать ее.

В этом уроке я расскажу все, что вам нужно знать о круговой ссылке, а также как найти и удалить циклические ссылки в Excel.

Итак, приступим!

Проще говоря, циклическая ссылка возникает, когда вы в конечном итоге получаете формулу в ячейке, которая сама по себе использует ячейку (в которую она была введена) для вычисления.

Позвольте мне попытаться объяснить это на простом примере.

Предположим, у вас есть набор данных в ячейке A1: A5, и вы используете приведенную ниже формулу в ячейке A6:

= СУММ (A1: A6)

Это даст вам предупреждение о круговой ссылке.

Это потому, что вы хотите просуммировать значения в ячейке A1: A6, и результат должен быть в ячейке A6.

Это создает цикл, поскольку Excel просто продолжает добавлять новое значение в ячейку A6, которое продолжает меняться (следовательно, цикл циклической ссылки).

Как найти круговые ссылки в Excel?

Хотя предупреждение о циклической ссылке достаточно любезно, чтобы сообщить вам, что оно существует на вашем листе, оно не сообщает вам, где это происходит и какие ссылки на ячейки вызывают это.

Поэтому, если вы пытаетесь найти и обработать циклические ссылки на листе, вам нужно знать способ как-то их найти.

Ниже приведены шаги, чтобы найти циклическую ссылку в Excel:

  1. Активируйте рабочий лист с круговой ссылкой
  2. Перейдите на вкладку «Формулы».
  3. В группе «Редактирование формул» щелкните раскрывающийся значок «Проверка ошибок» (маленькая стрелка, направленная вниз, справа).
  4. Наведите курсор на опцию Циркулярные ссылки. Он покажет вам ячейку с круговой ссылкой на листе.
  5. Щелкните адрес ячейки (который отображается), и вы перейдете к этой ячейке на листе.

Решив проблему, вы можете снова выполнить те же действия, описанные выше, и он покажет больше ссылок на ячейки, которые имеют циклическую ссылку. Если его нет, вы не увидите ссылку на ячейку,

Еще один быстрый и простой способ найти круговую ссылку — это посмотреть на строку состояния. В левой его части будет отображаться текст Циркулярная ссылка вместе с адресом ячейки.

При работе с круговыми ссылками необходимо знать несколько вещей:

  1. Если включено итеративное вычисление (описанное далее в этом руководстве), в строке состояния не будет отображаться адрес ячейки с круговой ссылкой.
  2. В случае, если круговая ссылка отсутствует на активном листе (а на других листах в той же книге), будет отображаться только круговая ссылка, а не адрес ячейки.
  3. Если вы получили предупреждение о циклической ссылке один раз и отклонили его, в следующий раз оно больше не будет отображаться.
  4. Если вы откроете книгу с циклической ссылкой, она отобразит подсказку, как только откроется книга.

Как удалить круговую ссылку в Excel?

Как только вы определили, что на вашем листе есть циклические ссылки, пора их удалить (если вы не хотите, чтобы они были там по какой-либо причине).

К сожалению, это не так просто, как нажать клавишу удаления. Поскольку они зависят от формул, а каждая формула отличается, вам необходимо анализировать это в каждом конкретном случае.

Если проблема вызвана ошибкой ссылки на ячейку, вы можете просто исправить ее, изменив ссылку.

Но иногда все не так просто.

Круговая ссылка также может быть вызвана на основе нескольких ячеек, которые взаимодействуют друг с другом на многих уровнях.

Позвольте мне показать вам пример.

Ниже в ячейке C6 есть циклическая ссылка, но это не просто случай ссылки на самого себя. Он многоуровневый, где ячейки, которые он использует в вычислениях, также ссылаются друг на друга.

  • Формула в ячейке A6: = СУММ (A1: A5) + C6.
  • Формула: ячейка C1 = A6 * 0,1
  • Формула в ячейке C6: = A6 + C1.

В приведенном выше примере результат в ячейке C6 зависит от значений в ячейках A6 и C1, которые, в свою очередь, зависят от ячейки C6 (что вызывает ошибку циклической ссылки)

И снова я выбрал очень простой пример только для демонстрационных целей. На самом деле, это может быть довольно сложно понять, и, возможно, они находятся далеко на одном листе или даже разбросаны по нескольким листам.

В таком случае есть один способ идентифицировать ячейки, которые вызывают циклическую ссылку, и затем обработать их.

Это можно сделать с помощью параметра «Отслеживать прецеденты».

Ниже приведены шаги по использованию прецедентов трассировки для поиска ячеек, которые передаются в ячейку с циклической ссылкой:

  1. Выберите ячейку с круговой ссылкой
  2. Перейдите на вкладку «Формулы».
  3. Нажмите на прецеденты трассировки

Приведенные выше шаги покажут вам синие стрелки, которые укажут, какие ячейки вводятся в формулу в выбранной ячейке. Таким образом, вы можете проверить формулы и ячейки и избавиться от циклической ссылки.

Если вы работаете со сложными финансовыми моделями, вполне возможно, что эти прецеденты также имеют несколько уровней глубины.

Это хорошо работает, если у вас есть все формулы, относящиеся к ячейкам на одном листе. Если это на нескольких листах, этот метод неэффективен.

Как включить / отключить итерационные вычисления в Excel

Когда у вас есть круговая ссылка в ячейке, сначала вы получаете предупреждение, как показано ниже, и если вы закроете это диалоговое окно, в качестве результата в ячейке вы получите 0.

Это связано с тем, что циклическая ссылка представляет собой бесконечный цикл, и Excel не хочет зацикливаться на нем. Таким образом, он возвращает 0.

Но в некоторых случаях вам может потребоваться активировать циклическую ссылку и выполнить пару итераций. В таком случае вместо бесконечного цикла вы можете решить, сколько раз цикл должен быть запущен.

Это называется итерационный расчет в Excel.

Ниже приведены шаги для включения и настройки итерационных вычислений в Excel:

  1. Перейдите на вкладку Файл.
  2. Щелкните Параметры. Откроется диалоговое окно «Параметры Excel».
  3. Выберите формулу на левой панели
  4. В разделе «Параметры расчета» установите флажок «Включить итерационный расчет». Здесь вы можете указать максимальное количество итераций и максимальное значение изменения

Вот и все! Вышеупомянутые шаги позволят выполнить итеративный расчет в Excel.

Позвольте мне также быстро объяснить два варианта итеративного расчета:

  • Максимальное количество итераций: Это максимальное количество раз, которое вы хотите, чтобы Excel вычислил, прежде чем выдает окончательный результат. Поэтому, если вы укажете это как 100, Excel выполнит цикл 100 раз, прежде чем выдаст вам окончательный результат.
  • Максимальное изменение: Это максимальное изменение, которое, если не достигнуто между итерациями, вычисление будет остановлено. По умолчанию это значение 0,001. Чем ниже это значение, тем точнее будет результат.

Помните, что чем больше раз выполняются итерации, тем больше времени и ресурсов у Excel уходит на это. Если вы сохраните максимальное количество итераций на высоком уровне, это может привести к замедлению работы Excel или сбою.

Примечание. Когда включены итеративные вычисления, Excel не будет отображать предупреждение о циклической ссылке, а также теперь будет отображать его в строке состояния.

Умышленное использование круговых ссылок

В большинстве случаев наличие круговой ссылки на вашем листе будет ошибкой. Вот почему Excel показывает подсказку: «Попробуйте удалить или изменить эти ссылки или переместить формулы в другие ячейки».

Но могут быть некоторые конкретные случаи, когда вам понадобится круговая ссылка, чтобы вы могли получить желаемый результат.

Один такой конкретный случай, о котором я уже писал, получение отметки времени в ячейке в ячейке в Excel.

Например, предположим, что вы хотите создать формулу, чтобы каждая запись производилась в ячейке в столбце A, а метка времени отображалась в столбце B (как показано ниже):

Хотя вы можете легко вставить метку времени, используя следующую формулу:

= ЕСЛИ (A2 ""; ЕСЛИ (B2 ""; B2, СЕЙЧАС ()), "")

Проблема с приведенной выше формулой заключается в том, что она обновит все временные метки, как только на листе будет внесено какое-либо изменение или если рабочий лист будет повторно открыт (поскольку формула СЕЙЧАС является изменчивой)

Чтобы обойти эту проблему, вы можете использовать метод круговой ссылки. Используйте ту же формулу, но разрешите итеративный расчет.

Есть и другие случаи, когда желательна возможность использовать циклическую ссылку (вы можете найти здесь один пример).

Примечание. Хотя в некоторых случаях можно использовать круговую ссылку, я считаю, что лучше избегать ее использования. Циркулярные ссылки также могут сказаться на производительности вашей книги и замедлить ее. В редких случаях, когда вам это нужно, я всегда предпочитаю использовать коды VBA для выполнения работы.

Надеюсь, вы нашли этот урок полезным!

Другие учебники по Excel могут оказаться полезными:

  • # ССЫЛКА! Ошибка в Excel; Как исправить ошибку ссылки!
  • Обработка ошибок Excel VBA
  • Используйте ЕСЛИОШИБКА с функцией ВПР, чтобы избавиться от # ошибок Н / Д
  • Как сослаться на другой лист или книгу в Excel (с примерами)
  • Абсолютные, относительные и смешанные ссылки на ячейки в Excel

Direct Circular Reference | Indirect Circular Reference | Find Circular References

A circular reference in Excel occurs when a formula directly or indirectly refers to its own cell. This is not possible.

Direct Circular Reference

Let’s start simple. A direct circular reference in Excel occurs when a formula directly refers to its own cell.

1. For example, the formula in cell A3 below directly refers to its own cell (A3). This is not possible.

Direct Circular Reference in Excel

2. Press Enter. The circular reference error message appears.

Circular Reference Error Message

3. Click OK. Excel returns a 0.

Accept Direct Circular Reference

Indirect Circular Reference

An indirect circular reference in Excel occurs when a formula indirectly refers to its own cell. Let’s look at a simple example.

1. For example, cell D2 below contains the value 25.

Cell D2

2. Cell F4 refers to cell D2.

Relative Reference

3. Cell C5 refers to cell F4.

Relative Reference

4. So far, everything’s OK. Now replace the value 25 in cell D2 with the formula shown below.

Create Indirect Circular Reference

5. Press Enter. The circular reference error message appears.

Circular Reference Error Message

6. Click OK. Excel returns a 0.

Indirect Circular Reference in Excel

7. On the Formulas tab, in the Formula Auditing group, click Show Formulas.

Show Formulas

8. Cell D2 refers to cell C5. Cell C5 refers to cell F4. Cell F4 refers back to cell D2.

Circle

Conclusion: the formula in cell D2 indirectly refers to its own cell (D2). This is not possible. The formulas in cell C5 and cell F4 also refer back to their own cell (it’s a circle).

Find Circular References

To find circular references in Excel, in the Formula Auditing group, click the down arrow next to Error Checking and click Cell References.

1. Our sheet contains 2 circular references. 1 direct circular reference (A3) and 1 indirect circular reference (D2, C5 and F4).

Circular References in Excel

2. On the Formulas tab, in the Formula Auditing group, click the down arrow next to Error Checking.

Error Checking

3. Click Circular References. Excel shows the cell address of one circular reference.

Find Circular Reference

4. You can also look at the status bar. This is much easier.

Status Bar

5. Fix this circular reference.

Fix Circular Reference

To find more circular references, repeat these steps.

6. On the Formulas tab, in the Formula Auditing group, click the down arrow next to Error Checking.

Error Checking

7. Click Circular References. Excel shows the cell addresses of the indirect circular reference.

Multiple Cell Addresses

8. The status bar only displays a single cell address.

Single Cell Address

Note: fix this circular reference by replacing one of the formulas with a value. As a result, the warning in the status bar will disappear.

Excel offers a wide and versatile set of formulae that ranges from basic to more advanced calculations. However, the higher the level of complexity, the more chances you will encounter a problem in your dataset.

If you have come across this error message, “There are one or more circular references where a formula refers to its own cell, either directly or indirectly. This might cause them to calculate incorrectly. Try removing or changing these references, or moving the formulas to different cells.”, then it is likely that you tried to apply a formula to its own cell.

By the end of this article, you will know how to locate and remove a circular reference in Excel effectively to quickly resolve any further issues you may encounter in your dataset.

What is a circular reference?

According to Microsoft, a circular reference occurs when “your formula is trying to calculate itself». In simpler words, the formula refers to the same cell where it’s located, creating a reference loop that keeps the formula working without completion. The examples below will show what a circular reference looks like in Excel.

Circular reference example(s)

If you select a cell and type in “=” sign followed by that same cell, it creates a circular reference. For example, “=E1”.

How To Find Circular References In Excel Circular reference example 1

How To Find Circular References In Excel — Circular reference example

As you can see below, Microsoft Excel prompts the circular reference error message. Click “OK” to proceed.

How To Find Circular References In Excel Circular reference message

How To Find Circular References In Excel — Circular reference message

Now, we’ll try with a less basic formula, also including the cell of the formula. For example, “=IF(E1=2, “YES”)”.

How To Find Circular References In Excel Circular reference example 2

How To Find Circular References In Excel — Circular reference example

As soon as you hit “Enter” you will get a “0” result instead of the error message. However, this is a way to let you know that there is something wrong with the formula. Now, let’s explore how to find circular references in Excel to fix them.

How to Recover Unsaved Excel Files?

If Excel crashed or you didn’t save your hard work, don’t panic! There are ways to retrieve your file. Here’s how to recover an unsaved Excel file.

READ MORE

How to Recover Unsaved Excel Files

How to find circular references in Excel?

To find a circular reference is easier than you think. You simply need to use the “Circular References” feature under the Formulas tab. This will help you locate any circular reference in your spreadsheet, so you can then proceed to remove or fix it, if possible.

  1. 1. Go to Formulas > Error Checking > Circular References. The cells containing a circular reference will appear as a list next to the menu.

How To Find Circular References In Excel Error Checking

How To Find Circular References In Excel — Error Checking

  1. 2. The circular reference is also displayed at the bottom of the active sheet, showing the cell where it’s located. Here, “E1”.

How To Find Circular References In Excel Circular reference active

How To Find Circular References In Excel — Circular reference active

Note that you may have circular references in sheets besides the active one. In this case, Excel won’t display the cell, only “Circular Reference”.

If you find that the “Circular References” function doesn’t work, you may need to disable the “Iterative Calculation” option. Although this function is usually disabled by default, you can check by going to File > Options > Formulas.

How To Find Circular References In Excel Iterative Calculations

How To Find Circular References In Excel — Iterative Calculations

In “Calculation options” you should see the “Enable iterative calculations” box disabled. If you enable this feature, Excel will recalculate the formula as many times as necessary. This will definitely affect the correct functioning of your workbook. However, you can always specify how many times Excel should recalculate in “Maximum Iterations”.

Now that you know how to identify a circular reference in Excel, let’s see how you can remove circular references in your Excel file.

How to remove circular references in Excel?

Unfortunately, there is no button or feature to get rid of circular references in Excel at the same time. If your dataset is large and complex, sometimes you can’t find a circular reference in Excel as easily as shown previously. To do so, you’ll need to trace relationships between formulas and cells. This is how you can trace relationships to fix circular references.

  1. 1. Go to Formulas > Trace Precedents. This will display which cell is providing the data to the formula. Below, the blue arrow shows that cell F1, the precedent cell, is part of the formula in cell E1.

How To Find Circular References In Excel Trace Precedents

How To Find Circular References In Excel — Trace Precedents

  1. 2. Select “Trace Dependents” to display the cells that contain the formula referencing the selected cell. Here, E1 is dependent on F1.

How To Find Circular References In Excel Trace Dependents

How To Find Circular References In Excel — Trace Dependents

  1. 3. To find out exactly how each cell is referencing another in the formula, select “Show Formulas” from the “Formulas” tab. Now you can identify the formula issues.

How To Find Circular References In Excel Show Formulas

How To Find Circular References In Excel — Show Formulas

  1. 4. As you can see within the formulas, these two cells are completely dependent on each other, causing this circular reference. Now you can pinpoint which cell references you need to alter within the formula in order to break this cycle. The most common way to do this is by turning at least one of the dependent cells into a static value (if possible). In this example, I can substitute my E1 reference with the static value of “5” to avoid a circular reference.

How To Find Circular References In Excel Static value

How To Find Circular References In Excel — Static value

  1. 5. To continue working on your spreadsheet as normal, you can click “Remove Arrows” on the same “Formulas” tab. You have the option of removing them altogether, or according to the type of trace, as shown below.

How To Find Circular References In Excel Remove arrows

How To Find Circular References In Excel — Remove arrows

In a few clicks, you’ve seen how to trace the cell relationships within a circular reference and how to fix it by substituting a cell reference with a static value. 

Please note: There are many circumstances where you are purposefully creating a circular reference within your Excel. In this case, it’s best to reduce the number of circular references within a single worksheet in order to reduce loading times.

Want to Boost Your Team’s Productivity and Efficiency?

Transform the way your team collaborates with Confluence, a remote-friendly workspace designed to bring knowledge and collaboration together. Say goodbye to scattered information and disjointed communication, and embrace a platform that empowers your team to accomplish more, together.

Key Features and Benefits:

  • Centralized Knowledge: Access your team’s collective wisdom with ease.
  • Collaborative Workspace: Foster engagement with flexible project tools.
  • Seamless Communication: Connect your entire organization effortlessly.
  • Preserve Ideas: Capture insights without losing them in chats or notifications.
  • Comprehensive Platform: Manage all content in one organized location.
  • Open Teamwork: Empower employees to contribute, share, and grow.
  • Superior Integrations: Sync with tools like Slack, Jira, Trello, and more.

Limited-Time Offer: Sign up for Confluence today and claim your forever-free plan, revolutionizing your team’s collaboration experience.

Conclusion

If you want to avoid Excel from entering an endless loop and slowing down all calculations overall, having a full understanding of what a circular reference is and how to fix it is as crucial as it is useful.

This article has explained the concept of “circular reference”. You have also seen how to find circular references and remove them in Excel in just a few steps. Interested in learning more about formulas in Excel? Take a look at some of our latest blog posts:

  • Excel INDIRECT Function: Formula and Examples
  • How to VLOOKUP in Excel with Two Spreadsheets?
  • How to Calculate IRR in Excel? (IRR Function & Formula)

Circular references in Excel can be quite a source of annoyance. If you’ve come across this error, you’re not alone.

Numerous Excel users face this problem every day, but the good news is that it’s solvable.

In this tutorial, we will discuss what a circular reference means, what happens when there’s a circular reference in your Excel spreadsheet, and how to find them and fix circular references in Excel.

In some exceptional cases, you might actually want Excel to allow circular references.

So, we will also discuss how you can enable/disable circular reference warnings.

What is a Circular Reference in Excel?

A circular reference is a formula that tries to access its own cell location either directly or indirectly, causing an infinite loop.

This may either be accidental or intentional.

For example, if you type the formula =A1 in cell A1, then this creates a circular reference, since your formula is trying to access its own location. 

An example of circular reference in Excel

It’s also a circular reference when you use the following formulas in cell A1:

=A1*2 or =IF(A1=5, “yes”,”no”).

Since we need the result in cell A1 and we are entering the formula in cell A1, we can not refer to the same cell.

In almost all cases, your formula in the cell would be referring to other cells in the spreadsheet.

Two Types of Circular References in Excel

Circular references can be of two types:

  • A direct circular reference
  • An indirect circular reference

A direct circular reference is what we just saw – a cell directly trying to access its own location (for example, entering =A1 in cell A1 itself).

A very common direct circular reference is when we try to sum up cells in a column and accidentally end up including within the sum formula, the same cell containing the formula.

For example, in the screenshot below, we are trying to sum up all the cells of column A, which also includes cell A6 (the cell containing the sum formula).

SUM formula with circular reference issue

In this way, the formula in A6 is trying to refer to itself, and thus we see a circular reference warning message.

An indirect circular reference takes place when a cell is trying to access a cell that in turn is referring back to itself, either directly or indirectly.

For example, in the screenshot below, cell A1 is referring to cell B5, but cell B5 is, in turn, referring back to cell A1.

So indirectly, cell A1 is referring back to itself, causing a circular reference.

Indirect circular reference

The following screenshot shows another example of a circular reference.

This time cell A1 refers to cell B5, which in turn indirectly refers back to cell A1 (through C3).

Another example of indirect circular reference

What Happens when there is a Circular Reference in Excel?

When you force a formula to reference its own cell, Excel shows the following error message:

“Careful, we found one or more circular references in your workbook which might cause your formula to calculate incorrectly.”

This is because a circular reference causes an endless loop, as Excel keeps returning to the same cell over and over.

If you have large datasets that involve multiple formulae referring to multiple cells in multiple sheets, you will find your work getting increasingly complex.

This may result in an increased risk of errors, invalid data, or incorrect formulae.

Besides the error message, when you have a circular reference in your sheet, you can also see a circular reference warning in the status bar below the worksheet.

The status bar displays only the latest circular reference. You can use this warning to backtrack and resolve the conflict.

In some cases, you can also see arrows pointing in the direction of the references to help you clearly see why the references are cycling back and forth.

For example, in the following sheet, there are two different types of circular references.

To the right side, there is a direct circular reference, where G6 refers to H7, which refers back to G6.

Notice that Excel shows a two-way arrow between the two cells, to tell you that there is a circular reference here.

Similarly, on the left side, there is an indirect circular reference too, where cell A2 refers to cell B5, which refers to cell C3, and C3 refers back to cell A2.

Here, Excel shows 3 one-way arrows in a triangular shape to mark that there is a circular reference between these three cells.

Circular reference marked with arrows

You can also see that the status bar includes the status ‘Circular References: H7’, telling us that the sheet includes one or more circular references.

Although there are two different circular references in this sheet, the status bar shows a reference to only the last circular reference.

To resolve a circular reference issue in Excel, you need to first detect it and find its origin.

Even though you get a warning as soon as a circular reference occurs, it is sometimes not possible to detect the error as soon as it occurs, because there might be more than one circular reference in the cell, or you might be looking at a sheet that has been prepared by someone else. 

Resolving a circular reference is especially difficult when you have a large or complex dataset that involves multiple formulae referring to multiple cells.

Such datasets have an increased risk of errors, and these errors are often difficult to trace.

However, there are ways to detect the source of the error. Once you know which cell or formula the error originated from, it becomes much easier to fix it.

Here are two ways to find circular references in Excel:

  • Using Excel’s Error Checking menu
  • Using Excel’s Trace Dependents and Precedents feature

Both features are under the ‘Formula Auditing’ group of the Formulas tab.

Using Excel’s Error Checking Menu to Find Circular References

Excel offers the Error Checking menu to help you quickly detect and resolve different types of errors.

As such, you can use this menu to find all the cells in your sheet that have a circular reference too.

Let’s say you have the following dataset, where cell A2 refers to cell B5, but cell B5 refers to cell C3, which in turn refers back to cell A2.

In other words, we have an indirect circular reference situation here, where cell A2 is, in essence, referring back to itself.

Indirect circular reference

Let us see step-by-step how to use Excel’s Error Checking menu to find and resolve this error:

  1. Click on the Formulas tab
  2. Click on the Error-checking dropdown menu (under the Formula Auditing group).
  3. From the dropdown list that appears, hover over ‘Circular References’.
Select Circular references in Error checking
  1. You should see the list of cells that comprise the last created circular reference in the sheet.
Address of Cells with circular references
  1. Click on any one of the cells in this list.
  2. You should see the corresponding cell activated so that you can go ahead and resolve the issue.

Now you can either choose to remove the cell reference, change the formula or move it to some other location, whatever best solves your circular reference problem.

Using the Trace Dependents and Precedents Feature to Find Circular References

Another method to help you trace and resolve circular references is by using the Trace Dependents and Precedents feature.

Tracing dependents and precedents lets you find the path that connects the references with a line drawn between cells causing the circular reference.

The Trace Precedents feature lets you trace back to cells that the current cell references (or depends on). The feature draws a line showing the cell(s) affecting the current cell.

For example, in the screenshot below, when cell A2 is your active cell, the Trace Precedents feature shows the arrow pointing from cell B5 to A2, which means that ‘A2 depends on B5’ or ‘B5 is affecting cell A2’.

 Trace Precedents feature to show referred cells

The Trace Dependents feature lets you locate the cells that are dependent on the active cell. The feature draws a line showing the cell(s) that are affected by the current cell.

For example, in the screenshot below, when cell A2 is your active cell, the Trace Dependents feature shows the arrow pointing from cell A2 to C3, which means that ‘C3 is dependent on A2’ or ‘A2 is affecting cell C3’.

Arrows showing which cell is dependent on which cell

Why is this important in resolving circular references?

Well, we need to understand where the error in a cell originates from, so we need to trace it back to the cell’s precedents.

We also need to know which other cells are being affected by the problematic cell, so we need to trace the erroneous cell’s dependents.

The graphical view that this feature gives us (with the arrows) makes it easier to quickly trace the path of a circular reference, making it quick and easy to resolve the conflicts.

To access this feature, follow the steps shown below:

  1. Check the cell references next to the ‘Circular Reference’ status in the status bar.
Circular reference is also shown in the status bar
  1. Click on the cell referenced to activate it.
Click on the cell with circular refernece
  1. Click on the Formulas tab.
Click on Formulas tab
  1. Click on Trace Precedents (under the Formula Auditing group) to track the cells that the active cell depends on. Click this button again and again till you can see an actual circular reference path. Alternatively, you can click on Trace Dependents (under the Formula Auditing group) repetitively to track the cells that depend on the active cell.
Arrows tracing precedents

Once you can see the full path of the circular reference, you can go ahead and resolve the conflict by addressing the references one by one.

Note: You can use the shortcut ALT+T U D to trace dependents and ALT+T U T to trace precedents.

How to Enable/Disable (or Allow) Circular References in Excel

Circular references, though problematic, can actually be required in some situations. That is why you only get a circular reference ‘warning’.

It is not considered an error by Excel. This means you are allowed to ignore the warning and continue working on your sheet if you want.

If your application actually needs to use a circular reference, or you just want to keep working without being bothered by the repeated circular reference warnings, you can choose to enable Iterative calculations.

Iterative calculations are those that run over and over using previous results. They are often used to find the solution to mathematical problems. 

For example, when you are trying to compute the Future value of an investment, you need to repeatedly update your initial value with the computed total value at the end of a given time period. 

Future value calculation dataset

To compute the total amount at the end of each month, your formula is:

Formula to calculate future value

Your computed total value here is computed using a formula that requires the initial value at the beginning of the time period, while the initial value has to keep getting updated with the total amount each month. 

Changing Initial value will give rise to circular reference issue

This gives rise to a circular reference, but one that is required.

To avoid going into an infinite loop, you need to limit the number of iterations.

For example, in this case, since we want to find the Future value at the 12th month, we can simply limit the number of iterations allowed to a maximum of 12.

Another example is when you need to have an automatic timestamp, that computes the current date and time whenever new information is added to a given cell.

In such cases, you can use a formula like the one shown below, which checks if A2 is empty, and if so, it computes the current timestamp.

If a timestamp already exists in A2, it does not recalculate.

=IF(B2<>"",IF(A2<>"",A2,NOW()),"")

This kind of circular reference is usually required when you’re using volatile functions like NOW, which recalculate every time the sheet loads, or when there is a change in the sheet. 

Formula for timestamp

The above formula simply ensures that the NOW function computes just once and then the timestamp remains that way after that.

The above computation takes place just once, so the circular reference is pretty much harmless.

Under normal circumstances, Excel will not allow the iterative calculations when the above formula is used. It will throw a circular reference warning and return a 0. 

However, if you enable iterative calculations, the above formula will be allowed to have a circular reference and you will get the desired result.

If you want to enable iterative calculations, here are the steps to follow:

  1. Click on the File tab.
  2. From the list on the left sidebar, click on Options.
Click on Options
  1. This opens the Excel Options dialog box.
  2. Click on Formulas from the list of categories on the left.
Select the formulas option in the left pane
  1. Under Calculation Options, check the box next to ‘Enable iterative calculation’.
Check Enable iterative calculation
  1. Specify the ‘Maximum number of iterations’ and amount for ‘Maximum change’ according to what you need. If you’re not sure, then you can leave them at the default values. 
Enter 12 as the maximum iterations
  1. Click OK.

Iterative calculations should now get enabled and Excel will allow you to have circular references.

Future value formula will now work

Whenever you want to disable iterative calculations, repeat the same steps and uncheck the box next to ‘Enable iterative calculations’ in step 5.

In this tutorial, we discussed circular references, why they happen, and how to fix them.

We also showed you some cases where they might be useful and how to get Excel to allow circular references in your sheets.

Although circular references might be advantageous in some rare cases, we suggest that you avoid them as far as possible, either using VBA or some other alternatives.

Some Other Excel tutorials you may also like:

  • SPILL Error in Excel – How to Fix?
  • Why does Excel Open on Startup (and How to Stop it)
  • How to Start Excel in Safe Mode (3 Easy Ways)
  • How to Calculate NPV in Excel (Net Present Value)
  • Can’t Type In Excel: 6 Possible Reasons and Solutions!
  • Why is Merge and Center Grayed Out?
  • How to Break Links To External References in Excel?
  • How to Get the Cell Address Instead Of Value In Excel?
  • 3D Reference in Excel – What is it and How to Use it?

Понравилась статья? Поделить с друзьями:
  • Excel can delete columns
  • Excel can add columns
  • Excel calculator for compounding interest
  • Excel calculate if value in cell
  • Excel calculate from sheet to sheet