Excel VBA Rows(#).Calculate not working for some rows
I use Excel for complex iterative calculations that use circular references. These spreadsheets are run with the Options for Manual Calculation and Iterative Calculation on and set to 1 iteration.
To correctly calculate the iterative functionality (ie bypass Excels inheritance calculation order), I use a VBA function to calculate each row in the Worksheet from top to bottom. This used to work correctly with the following simple code:
For i = 3 to 30
Worksheets(“Calculation”).Rows(i).Calculate
Next i
But it appears that this was broken by an update with it working on simple calculations in the row, and cells with circular references are Not calculated.
I have tired using Range(“5:5”).Calculate, and even Range(“B5”).Calculate, but neither work.
A manual Calculation by pressing “F9” updates all cells, but as mentioned the execution order does not give the correct result.
I use Excel for complex iterative calculations that use circular references. These spreadsheets are run with the Options for Manual Calculation and Iterative Calculation on and set to 1 iteration. To correctly calculate the iterative functionality (ie bypass Excels inheritance calculation order), I use a VBA function to calculate each row in the Worksheet from top to bottom. This used to work correctly with the following simple code: For i = 3 to 30 Worksheets(“Calculation”).Rows(i).Calculate Next iBut it appears that this was broken by an update with it working on simple calculations in the row, and cells with circular references are Not calculated. I have tired using Range(“5:5”).Calculate, and even Range(“B5”).Calculate, but neither work.A manual Calculation by pressing “F9” updates all cells, but as mentioned the execution order does not give the correct result. Read More