LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Dependency problem

My workbook runs well in Excel97, but not in Excel2000. The
problem I have seems to be pretty difficult.

In the spreadsheet, I have (among other things):
- a set D of data (cells containing raw numbers),
- a set F of formulas (some are udf's) based on D,
- a formula G (not udf) based on both D and F,
- a formula U (a udf) based on D, F and G.
The situation is easier to comprehend by viewing a diagram,
but it seems that there can be no attachments to messages
here. So I sketched it below, but there are 5 arrows missing:
- from D to G
- from D to U
- from F to G
- from F to U
- from G to U


G


D --------- F


U


The code for formula U reads the values in all the cells of
D and F without problem: Range(...).Value2. But it can't
read cell G before its 1,805th attempt (the number 1,805
depends on the number of calls to U in the spreadsheet, of
course). That's a big waste of time.

If you draw the arrows above, you'll notice that there are 2
triangles, one inside the other. First, I thought that the
problem arose because VBA2000 considered this as a circular
reference. But in that case, why would the cell containing G
be successfully read after a number of attempts ? So I
thought, maybe the problem is that the cells in F are
calculated last. But that's not the case: all their values
are known to VBA before the 900th attempt to read G.

At first sight, a solution would be to calculate the value
of G in VBA instead of calculating it in the spreadsheet.
That way, cell G wouldn't have to be read in VBA. But that's
not really satisfactory. Cell G is needed in the
spreadsheet. So I have 2 choices: either calculate G in the
spreadsheet AND in VBA (messy), or call a udf in cell G to
get the value calculated in VBA. But in that case, I might
very well end up with the same problem I am having right
now. Before losing any more time (I've been working on this
for a month), I thought I'd ask the specialists: what is the
cause, what is the solution ?

Thanks
 
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
inter-dependency kc Excel Worksheet Functions 1 February 13th 09 03:52 AM
dependency changes after row insert John Excel Discussion (Misc queries) 1 January 14th 08 10:22 AM
Drop down dependency stuff Pasty Excel Worksheet Functions 2 November 13th 06 10:13 AM
Cell reference dependency Jubelnar[_5_] Excel Programming 3 September 28th 05 07:10 AM
dependency protected cells Mario[_5_] Excel Programming 1 September 17th 03 09:01 PM


All times are GMT +1. The time now is 09:21 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"