Concepts


How does the computer figure out which calculation to do first?

The formulas you use in your spreadsheets may reference the values in other cells which themselves may contain formulas. This implies there is a certain order in which formulas need to be calculated. For example, the spreadsheet at the right has three formulas. Julie and Mindy share an apartment. Since Julie gets the large bedroom they have agreed she should pay 60% of the costs. Because of the "data dependencies" in this spreadsheet, B3 must be calculated before B4 which must be calculated before B5.

How does Excel keep track of which formulas to calculate first? It builds an internal data dependency graph that includes all of the formulas in the spreadsheet. Excel uses this internal data structure to determine the order of formula evaluation.

You have no control over the order of calculations; it's determined automatically by Excel. The one thing you do need to be aware of are circular references. Circular references can cause errors in your spreadsheet. For example, consider a marina that sells twice as many boats as trailers. The spreadsheet to the right attempts to calculate an estimate for the number of boats that will be sold as a function of the number of trailers that are expected to be sold. But, the estimate for the number of trailers to be sold is a function of the number of boats that are expected to be sold. The first time you introduce a circular reference you will get the following warning.

There may be instances when you want to use circular references. For more information, see the help topic under Help/Contents and Index/circular references.


Copyright 1997 by the Curators of the University of Missouri