I have a spreadsheet that has a small number of inputs, which drive a large number of intermediate calculations, which in turn drive a small number of expensive calculations that depend on many of the intermediate values. Some of the calculations use UDFs which return both single return values and arrays, while others are regular formulas in the cell itself.
I am curious if there is a known model to describe the update order of cells in Excel.
For instance, it could be changing input A1, which calculations B1, B2, B3 depend on, and calculation C1 depends on B1, B2, and B3… will C1 be updated three separate times as the intermediate values each update, or will B1, B2, and B3 update first, and C1 updates only once?
There is documentation about the algorithms Excel uses to find calculation sequences here
http://www.decisionmodels.com/calcsecretsc.htm
http://msdn.microsoft.com/en-us/library/aa140058%28office.10%29.aspx
But the bottom line is that since the calculation chain is dynamically determined and starts from the previous calculation chain sequence cells may be calculated more than once on one occasion and not on a subsequent recalc.
If you know the structure of your calculation dependencies you can control things to a certain extent by using Range.Calculate and Sheet.calculate.