Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
While investigating the performances of a workbook I added a Debug.Print N
inside a function so I can see when the function code runs. N is a static long that is increased every time. It prints also a text that allows me to see what cell is calling the function (useful when the same function is used in many cells.) I use the function 5 times in 2 sheets, for a total of 10 times. First weird thing: when I open the workbook the Immediate window shows more than executions. The function is executed once for some cells, but 2 or 3 times for others. I tried to close Excel and open the workbook twice: once I had 22 executions, then 20. I was expecting 10. Second weird thing: the functions are calculated when I change a cell referred in one function (good,) when I change a cell not referred in any function (bad,) and when I create a new workbook and change a cell in the new workbook (worse.) For example: I press Ctrl+N to create a new workbook (nothing appears in the immediate window) and press the Delete button, the Immediate window shows 14 calculations. Thanks, Stefano |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
When Excel incorrectly Calculates | Excel Discussion (Misc queries) | |||
Invoice that calculates total | Excel Discussion (Misc queries) | |||
macro that calculates average | Excel Programming | |||
If function that calculates | Excel Worksheet Functions | |||
Calculates Qty Received | Excel Worksheet Functions |