+ Reply to Thread
Results 1 to 3 of 3

autocalculate to include my function

  1. #1
    John F
    Guest

    autocalculate to include my function

    I have created a small function in module1. The function works correctly
    when entered in the worksheet but does not auto recalculate when some of the
    data it uses is updated.

    Can I force the recalculation to include this function?

    John.

  2. #2
    Niek Otten
    Guest

    Re: autocalculate to include my function

    Hi John,

    Please post the code of the function and the formula with which you call it.
    Probably the reason for not recalculating is that you access some cells
    directly from within the function.
    All input to a function should be via the argument list; otherwise Excel is
    not aware of the need for recalculation.
    A workaround is to include "Application.Volatile" in your function.
    However, that may slow down recalculation of your workbook and it is not
    guaranteed that it will be recalculated correctly in future versions of
    Excel.
    The only *correct* way is to include all input in the argument list.

    --
    Kind regards,

    Niek Otten

    "John F" <[email protected]> wrote in message
    news:[email protected]...
    >I have created a small function in module1. The function works correctly
    > when entered in the worksheet but does not auto recalculate when some of
    > the
    > data it uses is updated.
    >
    > Can I force the recalculation to include this function?
    >
    > John.




  3. #3
    Tom Ogilvy
    Guest

    Re: autocalculate to include my function

    Public Function myFunction()
    Application.Volatile

    End Function

    so using applicaton.Volatile will cause it to be recalced on every
    calculation. The alternative is to make the dependent cells part of the
    argument list for the function. This is what excel used to determine which
    cells it is dependent on.

    --
    Regards,
    Tom Ogilvy
    "John F" <[email protected]> wrote in message
    news:[email protected]...
    > I have created a small function in module1. The function works correctly
    > when entered in the worksheet but does not auto recalculate when some of

    the
    > data it uses is updated.
    >
    > Can I force the recalculation to include this function?
    >
    > John.




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1