View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tushar Mehta Tushar Mehta is offline
external usenet poster
 
Posts: 1,071
Default Excel volatil functions questions

With very few exceptions, Volatile is *never* the way to go. To me it
is simply a sign of an uninformed or a lazy programmer.

If A1 contains NOW() and somewhere else you have =ProcessDate(A1), XL
will process the cells in the correct sequence. It builds its own
'chains' of what cells need to be processed in what order.

As long as ProcessDate doesn't access elements of XL object model other
than the arguments, there is no need for it to be a volatile function.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...

Hi,

If, for example, I have a function that is used in a report template
and that needs to do some processing on the date.

processDate(A1) where A1 contains the NOW() excel function.

I have to questions :
- I want the result of processDate() to be automatically recalculate
when the user press F9, is volatil the good way to do?

- When Excel refresh its data, will it refresh the NOW() cell before
the processDate cell because if not, the result of processDate could be
wrong?

Thanks

Nic


--
nicgendron
------------------------------------------------------------------------
nicgendron's Profile:
http://www.excelforum.com/member.php...o&userid=25151
View this thread: http://www.excelforum.com/showthread...hreadid=396201