Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Iterating Circular References.

Iterating Circular References

by Allen Wyatt
(last updated August 13, 2018)


Circular references occur when a formula refers—either directly or indirectly—to the cell in which the formula is stored. For instance, if B3 contains the formula =B2+B3, then B3 contains a circular reference.

Normally, circular references represent a mistake in a formula. There are some situations in which circular references are desirable, however. Excel allows you to include circular references in a worksheet, but it can get a bit picky about them.

For the most part, Excel is very lenient about circular references if you have the Enable Iterative Calculation control turned on. (Display the Excel Options dialog box and then click Formulas at the left side of the dialog box.) If you select the Enable Iterative Calculation check box and then enter a circular reference, Excel doesn't protest. Instead, it uses the settings in the Excel Options dialog box to control how many times the circular reference is repeated before it is considered done.

It appears that the setting of the Enable Iterative Calculation check box is stored as part of a workbook, but it is not always paid attention to when the workbook is later loaded into Excel. In fact, the setting is ignored completely if any of the following occur before you open the workbook:

  • You open any other workbook besides the default workbook created when you first start Excel.
  • You change the Iteration check box while the default workbook is displayed.

What Excel does is to examine the Enable Iterative Calculation check box setting for whatever workbook you first open. That setting becomes the "default" for the current session with Excel. For any other workbook loaded during the same session, the saved setting of the Enable Iterative Calculation check box is ignored.

In addition, if you have a Personal workbook defined on your system, then the setting of the Enable Iterative Calculation check box within that file is always used as the default. Why? Because the Personal workbook is always the first workbook opened, and the first workbook opened always defines the default for the setting.

If you have a saved workbook that uses circular references and the Enable Iterative Calculation check box is cleared (either by default or explicitly), then when you open the workbook containing the circular references, Excel displays a warning. If you don't want to see the warning, then the obvious solution is to either make sure that you open the workbook before any other workbook (so that its Iteration setting is used) or explicitly set the Enable Iterative Calculation check box before opening the workbook.

If you don't want to bother worrying about which order you open workbooks and you don't want to always go change the setting of the Enable Iterative Calculation check box, you can create a macro that ensures the Enable Iterative Calculation check box is selected for the workbook. If you assign the macro to the Open event for the workbook, then it will run every time the workbook is opened, ensuring that you won't see the warning you don't want to see. The macro appears as follows:

Private Sub Workbook_Open()
    Application.Iteration = True
End Sub

If you have a Personal workbook defined for your system, you can add this macro to it instead of to individual workbooks. In that way you can ensure that the Enable Iterative Calculation check box is always selected for every Excel session.


If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9748) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Iterating Circular References.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...


Printing All Open Documents

Have a bunch of documents you need to print? If all the documents are open, you can use a handy little macro to print ...

Discover More

Examining Styles and Macros in a Template

Templates are very powerful with the ability to contain both styles and macros. If you want to see what styles and macros ...

Discover More

Adjusting a Path Based on System and User

It is not uncommon to set variables in a macro based on other values, such as time or date. You could also set variables ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Displaying a Count of Zeros on the Status Bar

Excel allows you to display the results of several common worksheet functions on the status bar. The available functions ...

Discover More

Message about a Problem with the Clipboard

Imagine this: You are working along just fine in Excel, then you try to make an edit to your workbook that causes a ...

Discover More

Inserting the User's Name in a Cell

Need to understand who is using a particular workbook? There are a number of ways you can find out, as discussed in this tip.

Discover More

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is four more than 2?

2015-12-16 05:33:23


Is there any way i can bring iterative calculation enabler on the ribbon or link iterative calculation switch on/off to a particular cell on the worksheet.

2015-05-22 21:11:20

Peter Atherton


We try to keep posts within the forum; try this UDF
Function StaticSum(ByVal ref) As Long
Static Accumulate
Accumulate = Range("B2")
Accumulate = ref + Accumulate

StaticSum = Accumulate

End Function
This function; between the lines, should be copied into a VB Module (Alt+F11,Alt+i,M)

This works while the sheet is active. However, if the sheet is deactivated the holding value is lost so you need another macro to update the holding value in B.

Here are two:

Private Sub Worksheet_Calculate()
Range("B2") = Range("C2")
End Sub

Private Sub Worksheet_Deactivate()
Range("B2") = Range("C2")
End Sub

These are placed in the Worksheet Module. Just right-click the sheet tab and choose View code from the pop-up menu and post the code.

Post back if if you need more help

2015-05-20 14:18:30

hardik patel

Respected Sir,
I am preparing an inventory sheet, but facing problems with circular reference errors
I have three columns
A -New addition
B -old entry
C -final entry

assume that B already has a cell value of 100 and A has 5, now the total goes to C, which is 105

now I have to add another cell value of 20 to A, by removing 5... but the value comes to 120 instead of 125 in C, because I need to add values frequently to A and adding them to C...

I have tried macros but unsuccessful..
plz guide me on my email address

This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.