Question

I have set automatic as workbook calculation mode, Enable iterative calculation for my Excel, 1 as Maximum Iterations, and 0.001 as Maximum Change. This setting permits thus circular reference in my worksheet.

So I put =D4+1 in D2, and =D2+1 in D4. Now the values of D2 and D4 are respectively 1 and 2. Now if I refresh the worksheet, their values will increment by 2 as expected. If I calculate only cell D2 (select the cell, edit formula mode, and then press enter), their values will increment by 2 too, whereas if I calculate only cell D4, their values will be reset to 1 and 2.

My question is why the comportment of calculation of D2 and D4 are different? That means even though they are circular reference, there is still an order (beginning and ending), then what is the rule for Excel to determine the beginning point and the ending point?

Was it helpful?

Solution

From this page:

The first step is the same as a recalculation (or full calculation, depending how the calculation was invoked) that does not involve circular references. This enables all the cells that come before the circular reference to be properly calculated and the list of cells in the circular reference to be identified together with their dependents. During this first step Application.Iteration is False.

The second step occurs once on each iteration:

The list of cells in the circular reference is calculated sheet by sheet, in alphabetic sheet name sequence. Within each sheet the list of cells and array formulae in the circular reference, and all cells that are dependent on them, is calculated from left to right and top to bottom. (all the columns in the first row from left to right, then the next row ...). Each array formula in the list is calculated as a single block of cells from left to right and top to bottom, so if you want to use calculation by columns rather than by rows you have to use a multi-cell column array formula.
This calculation ignores the dependency tree and relies on the iterative calculation process to resolve dependencies.
Volatile cells that are not dependent on the cells in the circular list are NOT recalculated on each iteration.

This step is repeated until the iteration limits (maximum number of iterations and maximum cell change per iteration) are reached. During this second step Application.Iteration is True.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top