开发者

How to ensure sequence of functions calling in a Excel sheet

开发者 https://www.devze.com 2023-01-03 11:36 出处:网络
Is there anyway to control the sequence of function calls in a excel 开发者_Python百科sheet when it is re-opened ? Excel automatically re-evaluate the functions when it restarts, where I need to ensur

Is there anyway to control the sequence of function calls in a excel 开发者_Python百科sheet when it is re-opened ? Excel automatically re-evaluate the functions when it restarts, where I need to ensure one of my function set is called before another set of function calls.

Thank You


I suggest that you create a subroutine named Workbook_Open() It will run when you open the spreadsheet and you can call your subroutines that need to run first there. You obviously can exactly control the order of execution.


Create a fake dependency, so Excel constructs the dependency tree to suit your needs.

For example, if you need A1 to be calculated previously to A2 enter a formula in A2 that is dependent on A1

 A2 = Your_Previous_formula() + A1 - A1

So Excel will try to calculate A1 first

I assume that your formulas reference external objects or applications. If there is a REAL inverse dependency currently in your cells you will create circular references.

0

精彩评论

暂无评论...
验证码 换一张
取 消