User defined functions

A

Andy Ives

can anyone tell me why I cannot get user defined functions
that are called from a worksheet formula to recalculate
when the spreadsheet updates please?

Cheers

Andy
 
B

Bob Umlas

After the first line of the function put:
Application.Volatile True
to have it calculate when ws calculates.
Bob Umlas
Excel MVP
 
A

Andy

Thanks Bob. I'll give that a try.

Andy
-----Original Message-----
After the first line of the function put:
Application.Volatile True
to have it calculate when ws calculates.
Bob Umlas
Excel MVP




.
 
C

Charles Williams

Excel recalculates UDFs when one of their input arguments change or when
they are volatile.

Best solution is to put all the cells etc that are referenced by the UDF as
arguments to the function. That way the function only gets recalculated when
it needs to.
next best (but simplest) is to add application.volatile which makes the
function always recalculate even when it does not need to.


regards
Charles
______________________
Decision Models
FastExcel Version 2 now available.
www.DecisionModels.com/FxlV2WhatsNew.htm
 
Top