+ Reply to Thread
Results 1 to 15 of 15

Is there any way to determine what is triggering a name to recalculate?

  1. #1
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Is there any way to determine what is triggering a name to recalculate?

    I'm trying to get rid of all the volatile Dynamic Range Names in my workbook. IOW: I'm trying to get rid of "Offset(....)" in my Range Names.

    I have a Range Name that uses a UDF() 2 times. I have verified that the UDF() has "Application.Volatile False" as it's first line. The UDF() is being executed hundreds of times when I move my cursor.

    Is there some way to determine what cells are triggering the Range Name to recalculate?
    Or maybe an explanation of why the UDF() is being triggered when all I do is move my cursor?

    Here are the UDF() and Range Names. $A$13 and $A$15 have #s in them (no formulas).

    Please Login or Register  to view this content.
    Last edited by foxguy; 10-27-2011 at 07:08 PM.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Is there any way to determine what is trigger a name to recalculate?

    Hmmm...could it be the reference to .EntireColumn?
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Is there any way to determine what is trigger a name to recalculate?

    What are you thinking would be the reason that a reference to the EntireColumn in a UDF() cause the RangeName to be volatile.

  4. #4
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Is there any way to determine what is trigger a name to recalculate?

    Just going out on a limb. If there are volatile cells in that column, would that not be enough to trigger recalc?

  5. #5
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Is there any way to determine what is trigger a name to recalculate?

    There are no formulas in that column. It is raw data.

    I believe that the Range Name is being recalculated because some other cell or Name uses a formula that uses that Range Name. I'm trying to find that cell or name. This particular Range Name will be easy to find, but I want to do this for hundreds of Range Names, so I need to figure out what is triggering this Range Name to recalculate.

  6. #6
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Is there any way to determine what is trigger a name to recalculate?

    Stuck...sorry. Maybe attach your book and give this a bump and see if you get a response from another member.

  7. #7
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Is there any way to determine what is trigger a name to recalculate?

    bump......

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: Is there any way to determine what is trigger a name to recalculate?

    @foxguy: given your experience in the forum, you're not giving Tom much to go on ... or anyone else.

    Unless it's a guessing game for which you are the host, there doesn't seem much point offering suggestions which aren't "relevant"

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  9. #9
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Is there any way to determine what is trigger a name to recalculate?

    Why so complicated ?

    if basecol is fixed ("$CC$22") the result of the function will be fixed too: columns("CC")

    So the named range 'Base' could simply be written as:

    Please Login or Register  to view this content.



  10. #10
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Is there any way to determine what is trigger a name to recalculate?

    TMShucks;
    While replying I think I figured out what's causing the Range Name to recalculate all the time.

    Range("Base") is on Sheets("R").
    On Sheets("P") I have a column of formulas
    'P'!BE20: "=INDEX('R'!Base,$BA20)", copied down the column.
    'P'!BA20: "=MATCH($D20,'R'!Codes,0)", copied down the column.
    'P'!D20: is a # (no formula).
    'R'!Codes is a column of #s (no formulas).

    But:
    Range Name 'R'!Codes uses "Offset(....)" in it's RefersTo. Offset() is Volatile (which is why I'm trying to get rid of it), so 'R'!Codes gets recalculated every time the sheet is calculated and every formula and Name that refers to 'R'!Codes get recalculated right along with it. It seems obvious now.

    But why does the sheet calculate when I move the cursor?

    I think that what you are referring to is my tendency to keep my questions generic. Too many times I have given an example of what I'm trying to figure out and people reply with a solution that only works on the specific example and not on the bigger problem. So I try real hard to make it hard for someone to solve the specific example and force them to concentrate on the bigger problem. This time it looks like it backfired on me, because the solution seems so obvious now.

    Thanks for forcing me to look at it from a different angle.
    Last edited by foxguy; 10-27-2011 at 07:12 AM.

  11. #11
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Is there any way to determine what is trigger a name to recalculate?

    snb;
    Please Login or Register  to view this content.
    Indirect is also volatile, which is what I'm trying to get rid of.
    I can't hard code the column ("$C:$C") because that doesn't allow "CC18:CC200" to be cut and pasted somewhere else.
    Last edited by foxguy; 10-27-2011 at 07:13 AM.

  12. #12
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Is there any way to determine what is trigger a name to recalculate?

    I assume your post must be loaded with typos; your answer doesn't make any sense to me.

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: Is there any way to determine what is trigger a name to recalculate?

    @foxguy:

    Too many times I have given an example of what I'm trying to figure out and people reply with a solution that only works on the specific example and not on the bigger problem.

    When I ask for a sample workbook, my ideal is a subset of the actual workbook which contains a subset of de-sensitized actual/typical data in a worksheet and workbook which reflects the structure of the real thing. In that case, any solution that I propose is likely to be scaleable and transferrable to the live workbook.

    If the sample data and workbook does not reflect the live situation, the solution can only be "in principle" and, of necessity, require some adaption to fit the live workbook ... not always with any great ease.

    In this particular case, the only way that I can think of to maintain a dynamic named range is using INDEX rather than INDIRECT or OFFSET.

    Regards, TMS

  14. #14
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Is there any way to determine what is trigger a name to recalculate?

    snb;
    What I'm saying is that your formula doesn't accomplish what I'm looking for.

    A formula that uses "Indirect(....)" is volatile, which is what I'm trying to get rid of. Currently I have hundreds of Names that use "Offset(....)" and they keep recalculating every time the spreadsheet calculates and slows down the workbook. So replacing "Offset" with "Indirect" just makes it worse (I have a different workbook that had thousands of formulas using "Indirect", because I didn't realize it was volatile. When someone pointed that out to me, I couldn't believe how much faster it was when I got rid of the "Indirect"s.

    Also I can't use a formula that has "C:C" in it because sometimes the user of this file cuts a section of the column and pastes it somewhere else on the sheet. So if the formula includes "Index(C:C,.....)" doesn't work. If the user cuts C18:C6000 and pastes it into any other column (say F18:F6000) the formula still remains "Index(C:C,.....)" , but the data has been moved to column F. That's why I need a UDF(). If the formula is "Index(WC(C18),......)" and the user moves C18:C6000 to F20:F6002 the formula changes to "Index(WC(F20).....)".

    I appreciate any help you give me, and I don't want to just ignore you when your suggestions don't work. It always bugs me when I offer a suggestion and the member doesn't respond to let me know why my suggestions don't work for him/her.

  15. #15
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Is there any way to determine what is trigger a name to recalculate?

    Well, I was wrong.
    I have created a Range Name that uses a UDF(). It is not dependent on anything else in the workbook.
    Everytime I change cells the Name executes the UDF() 26 times.
    I have no idea what is triggering the Name to recalculate.

    Please Login or Register  to view this content.
    My Worksheet_SelectionChange() puts the Selection.Row and Selection.Column into cells and there are thousands of cells that are dependent on those 2 cells, so that explains why the sheet recalculates when I change cells.

    But why is Codes recalculating? How can find what is triggering Codes to recalculate?

+ 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