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.
by Allen Wyatt
(last updated August 16, 2014)
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:
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.
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.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
We all expect the keyboard keys to operate as normal, and when they don't, it can be bothersome. Geraldine had such a ...Discover More
Hate to take your fingers off the keyboard? Here's how you can move from worksheet to worksheet without touching the mouse.Discover More
Excel provides quite a bit of flexibility in displaying your data. You can have multiple windows visible for the same ...Discover More
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.