Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there a documented excel cell update order?

Tags:

excel

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?

like image 273
tbischel Avatar asked Nov 16 '10 21:11

tbischel


People also ask

Can you check when a cell was updated in Excel?

In the Review tab, select Show Changes. Changes are shown in the pane with the most recent changes on top, in the order the changes were made. You can see who made edits, exactly where in the workbook, when, and what they changed. You can also see Changes made at once by clicking on See changes in a bulk card.

How do you do sequential numbering in Excel?

Unlike other Microsoft Office programs, Excel does not provide a button to number data automatically. But, you can easily add sequential numbers to rows of data by dragging the fill handle to fill a column with a series of numbers or by using the ROW function.

How do I set up automatic recalculation in Excel?

In the Excel for the web spreadsheet, click the Formulas tab. Next to Calculation Options, select one of the following options in the dropdown: To recalculate all dependent formulas every time you make a change to a value, formula, or name, click Automatic. This is the default setting.


2 Answers

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.

like image 154
Charles Williams Avatar answered Oct 12 '22 19:10

Charles Williams


Excel now uses Multi-Threaded Calculation that makes the whole thing difficult to predict, excepting those directed childs in the dependency tree. See the link.

HTH!

like image 33
Dr. belisarius Avatar answered Oct 12 '22 19:10

Dr. belisarius