the_arcadian
New Member
- Joined
- Jun 20, 2019
- Messages
- 7
Hello MrExcel gurus,
The title of this post has the jist of my question, but here's a bit of background: I'm trying to optimize a very bulky financial model. I've got calculation time down to a couple seconds or so, but I'd like to isolate the specific cells whose calculations are still slowing things down. (Note: I know intuitively which formulas are slow... I just need to show it empirically to convince my team that changes are beneficial...)
I understand (per the discussion here) that by default Excel runs a 'smart calculation' algorithm upon workbook opening. After the 'smart calculation' determines the workbook's dependency trees, then if changes are made to the workbook, Excel only recalculates those dependencies impacted by that change (per here).
In that vein, could someone help me with the following:
Given a change to a specific range (one cell or multiple), call it "Range_X," I want to loop through each used cell in every worksheet and (1) determine if the cell is a dependent of Range_X and, if so, (2) evaluate the calculation time of that cell.
I have code to accomplish (2), but I'm at a loss for how to test (1), especially since I need to test whether each cell is a dependent of any order (i.e., a 'first order' dependency is a direct cell reference to Range_X; a 'second order' dependency is a reference to another cell that itself references Range_X, etc.).
Hope you all find this one interesting. Would appreciate any thoughts! Thanks!
The title of this post has the jist of my question, but here's a bit of background: I'm trying to optimize a very bulky financial model. I've got calculation time down to a couple seconds or so, but I'd like to isolate the specific cells whose calculations are still slowing things down. (Note: I know intuitively which formulas are slow... I just need to show it empirically to convince my team that changes are beneficial...)
I understand (per the discussion here) that by default Excel runs a 'smart calculation' algorithm upon workbook opening. After the 'smart calculation' determines the workbook's dependency trees, then if changes are made to the workbook, Excel only recalculates those dependencies impacted by that change (per here).
In that vein, could someone help me with the following:
Given a change to a specific range (one cell or multiple), call it "Range_X," I want to loop through each used cell in every worksheet and (1) determine if the cell is a dependent of Range_X and, if so, (2) evaluate the calculation time of that cell.
I have code to accomplish (2), but I'm at a loss for how to test (1), especially since I need to test whether each cell is a dependent of any order (i.e., a 'first order' dependency is a direct cell reference to Range_X; a 'second order' dependency is a reference to another cell that itself references Range_X, etc.).
Hope you all find this one interesting. Would appreciate any thoughts! Thanks!