Calculation Engine

Excel has a very complicated algorithm for choosing which cells to calculate in order to return the correct value from a formula.
The calculation algorithm was changed in Excel 2000 and again in Excel 2002.
Excel will always try and calculate the minimum number of cells possible and will only recalculate cells when:
1) cells, formulas, values or names have changed.
2) cells have been flagged as needing a recalculation.
3) cells dependent on other cells, formulas, names or values that need recalculating.

Calculation Options

For more details on VBA Calculation options, please refer to the Options page ??

Calculating all the open workbooks

Pressing F9 recalculates any cells that have changed in all the open workbooks.
Application.Calculate returns an error if there are no workbooks open.

If Workbooks.Count > 0 Then 
End If

Calculating all the worksheets in a Workbook

There is no quick way to do this so you have to loop through each worksheet in that particular workbook.

For Each WshName in ActiveWorkbook.Worksheets 
'copy from depository and/or put in depository

Calculating all the cells on just a particular worksheet

Pressing (Shift + F9) is the same as pressing F9 except that it only recalculates cells on the active worksheet.


Calculating a particular range on a particular worksheet



This will fail if calculation is set to manual and iteration is enabled.




Indicates whether Excel calculations are in progress, pending or done

Application.CalculationState = xlCalculationState.xlPending 

Returns the Excel version and calculation engine version used when the file was last saved.


Stops any recalculations in an Excel application



If a calculation find more than 65,536 dependencies then a full calculation is perfomed.

© 2017 Better Solutions Limited. All Rights Reserved. © 2017 Better Solutions Limited