Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Reason for calculation...

Hi,

is it possible to know in a custom function whether the
function is called as a result of one of it's dependants
having changed?

Example:

Cell formula "=myF(A5, C5)"

myF is now called if the value of cell A5 is updated. I
would like, in myF(), to detect this particular scenario.

Happy coding,

Dag
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default Reason for calculation...

Hi Dag,

One approach would be to store the values of the arguments in static
variables and compare.
You would have to use ISEMPTY to check for the case where the function is
called more than once per calculation cycle.
(see http://www.decisionmodels.com/calcsecretsj.htm)

of course in a normal recalculation of a non-volatile function the function
only gets called when one or more of its precedents change anyway (apart
from the multiple calls per recalculation problem). But inside a custom
function I do not know of a way of detecting which calculation method is
being used (full,recalc,sheet etc).


regards
Charles
______________________
Decision Models
The Excel Calculation Site
www.DecisionModels.com

"Dag Johansen" wrote in message
...
Hi,

is it possible to know in a custom function whether the
function is called as a result of one of it's dependants
having changed?

Example:

Cell formula "=myF(A5, C5)"

myF is now called if the value of cell A5 is updated. I
would like, in myF(), to detect this particular scenario.

Happy coding,

Dag



Reply
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
#NAME? error for no apparent reason... Monomeeth Excel Worksheet Functions 4 September 15th 08 08:22 AM
Security warning for no reason razlapi Excel Discussion (Misc queries) 3 February 8th 08 02:22 AM
Get WorkSheet Name without a reason Dileep Chandran Excel Discussion (Misc queries) 2 July 27th 07 06:51 AM
Excel slows down for no(?) reason... thekovinc Excel Discussion (Misc queries) 0 December 6th 05 06:01 PM
Any reason for no allowance of avatars?? malik641 Excel Discussion (Misc queries) 4 July 21st 05 03:17 PM


All times are GMT +1. The time now is 09:52 PM.

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"