I could replicate the behavior with a simple UDF like
I put =RAND() in column A (rows 1 to 149), and the UDF in column B. I suspect that this is revealing the actual order that Excel is calculating the spreadsheet. I do not claim to understand the internal workings of Excel's calculation engine. I agree, in this scenario, I don't understand why it does not just start at the top and work down. Even if I don't understand the algorithm behind it, I do notice that it seems to use the same calculation order each calculate event. It always started in row 146 (4th from the bottom) and did every 4th row on its way to the top. Then start near the bottom again and work towards the top in a different pattern, and so on. Interestingly, it always calculated row 1 last.
I thought it might have to do with multi-threading, where different copies of the UDF were being calculated in different threads, but I disabled multi-threaded calculation in Excel Options, and observed no change.
I suspect it does reveal something about the true order of calculation. I think it shows that Excel does not use a simple top to bottom left to right algorithm when it does not matter, though I cannot say what algorithm Excel is using to decide what order to perform the calculations.
Bookmarks