Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
donh
 
Posts: n/a
Default custom function not recalcing on sheet with outline view

Very strange: Have a user-written function used hundreds of times on one
sheet. Often, when the workbook is first opened, all of those function
references show as blank. Hitting F9 (recalc) has no effect; in fact the
only way I can get the functions to calculate is by expanding or compressing
one of the outline view ("grouping") areas on the sheet. At that point, all
the cells with the function in it recalc immediately and have the proper
values.

The functions in question are not within the outline area being changed. It
appears that if I remove all the grouping from the sheet, I can't get this
behavior. But I want the grouping there to help hide some parts of the sheet.

The function is a simple one, doing something similar to a VLOOKUP. It
follows the rules about all cells or ranges being referenced coming in
through the parameter list, so the calculation engine knows about precedents.

Does anyone know what might be causing this bizzarre behavior? I've not
found anything in the MS Knowledgebase or other web searches. Thanks in
advance.
--
Don H.
  #2   Report Post  
Vacation's Over
 
Posts: n/a
Default custom function not recalcing on sheet with outline view

add to function

application.screenupdating = false
'''ungroup everything
'''Your function code here
Application.calculate
''regroup everthing
application.screenuopdating = true


"donh" wrote:

Very strange: Have a user-written function used hundreds of times on one
sheet. Often, when the workbook is first opened, all of those function
references show as blank. Hitting F9 (recalc) has no effect; in fact the
only way I can get the functions to calculate is by expanding or compressing
one of the outline view ("grouping") areas on the sheet. At that point, all
the cells with the function in it recalc immediately and have the proper
values.

The functions in question are not within the outline area being changed. It
appears that if I remove all the grouping from the sheet, I can't get this
behavior. But I want the grouping there to help hide some parts of the sheet.

The function is a simple one, doing something similar to a VLOOKUP. It
follows the rules about all cells or ranges being referenced coming in
through the parameter list, so the calculation engine knows about precedents.

Does anyone know what might be causing this bizzarre behavior? I've not
found anything in the MS Knowledgebase or other web searches. Thanks in
advance.
--
Don H.

  #3   Report Post  
donh
 
Posts: n/a
Default custom function not recalcing on sheet with outline view

Thanks for the suggestion, but I don't think this will be a solution. Two
things:
First, there are hundreds of references to the function on the page, and I
don't think
I want to incur the overhead of grouping/ungrouping the whole page for each
function call. Further, I'd want the various groups on the page to remain
set the way they started, which could be a mixture of different levels of
expansion and compression. So the code to preserve those and reset them
would be elaborate.

My mention of the fact that grouping/ungrouping seems to trigger the recalc
was intended as a symptom that might help someone say "this is what is
happening." The underlying problem, though, seems to be that this sheet is
not recalc'd automatically when it needs to be, despite the fact that the
options setting is correct and the function has proper references to its
dependents through its parameter list. Actually, more accurately, it appears
as though it is not calc'd at all, even once, when the workbook is first
opened, until something explicit is done on this sheet to trigger the calc.
It is also the case that if I copy/paste to itself a single cell that happens
to be referenced in any one of the cells that call this function, then the
whole page recalculates instantly.

This is part of a fairly elaborate, large spreadsheet (20 sheets, thousands
of rows), but this is the first and only time I've ever seen any behavior
like this.
--
Don H.


"Vacation's Over" wrote:

add to function

application.screenupdating = false
'''ungroup everything
'''Your function code here
Application.calculate
''regroup everthing
application.screenuopdating = true


"donh" wrote:

Very strange: Have a user-written function used hundreds of times on one
sheet. Often, when the workbook is first opened, all of those function
references show as blank. Hitting F9 (recalc) has no effect; in fact the
only way I can get the functions to calculate is by expanding or compressing
one of the outline view ("grouping") areas on the sheet. At that point, all
the cells with the function in it recalc immediately and have the proper
values.

The functions in question are not within the outline area being changed. It
appears that if I remove all the grouping from the sheet, I can't get this
behavior. But I want the grouping there to help hide some parts of the sheet.

The function is a simple one, doing something similar to a VLOOKUP. It
follows the rules about all cells or ranges being referenced coming in
through the parameter list, so the calculation engine knows about precedents.

Does anyone know what might be causing this bizzarre behavior? I've not
found anything in the MS Knowledgebase or other web searches. Thanks in
advance.
--
Don H.

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
Using a relative SHEET reference for source data in a chart James Charts and Charting in Excel 6 August 16th 05 05:07 PM
How can I allow an outline to be collapsed on a protected sheet? LynnAnnO Excel Worksheet Functions 0 June 8th 05 05:39 PM
Protecting a sheet that includes a solver function 20002238Rijk Excel Worksheet Functions 3 December 9th 04 09:53 AM
Function to automatically insert a new sheet as a result of data entry? Mark Mulik Excel Worksheet Functions 2 November 28th 04 02:21 AM
Protecting a sheet that includes a solver function 20002238Rijk Excel Worksheet Functions 0 November 11th 04 01:44 PM


All times are GMT +1. The time now is 10:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"