LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default The worksheet calculates too often

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When Excel incorrectly Calculates Illya Teideman Excel Discussion (Misc queries) 8 March 8th 07 08:02 PM
Invoice that calculates total Mango Excel Discussion (Misc queries) 1 April 25th 06 08:48 PM
macro that calculates average jaguarr Excel Programming 1 August 11th 05 12:40 AM
If function that calculates Ernie [email protected] Excel Worksheet Functions 6 April 28th 05 07:32 PM
Calculates Qty Received Andri Excel Worksheet Functions 10 April 22nd 05 10:40 PM


All times are GMT +1. The time now is 01:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"