+ Reply to Thread
Results 1 to 2 of 2

Alternative ways to calculate circular references?

  1. #1
    Registered User
    Join Date
    10-16-2017
    Location
    Charlotte
    MS-Off Ver
    2016
    Posts
    31

    Alternative ways to calculate circular references?

    The most common way to calculate a formula involving a circular reference is by using iterative calculations. One example of an iterative calculation is to start with a random value for x_0, then use that value to calculate f(x_0), then set x_(n+1)=f(x_n) until f(x_n) is close enough to x_n.

    In the excel file I have attached I tried enabling iterative calculations to calculate a circular reference group on Sheet1, and found that when I just have it filled to the third row it already gives wildly inaccurate results, even after thousands of iterations, and you can test that by copying the formula from a cell inside the circular reference group, pasting it in a word document, copying the formula from the word document, pasting it into another cell, and then finding that the ratio between the values in the cell that is inside the circular reference group, and the cell that is outside the circular reference group are not necessarily close to 1.

    If you try to fill down from the third row to the 100th row on Sheet1 then once again the values in the cells that are within the main circular reference group on Sheet1 give wildly inaccurate results.

    Is there another way to go about finding the right values for the circular reference group if normal iterative calculations don't work?

    Also the cells with values in Sheets 2 through 4 have the function of converting random numbers, that I copy from a real random number generator, into initial values on sheet1. If the initial values below the left most red bar in sheet1 are making it so that the circular reference group has no self consistent solutions then I am curios as to whether there's a way to adjust some of the formulas in Sheet2 so that the cells below the left most orange bar in sheet1 can only have values that allow for self consistent solutions in the circular reference group on sheet1 without making all the values in the cells below the left most orange bar 0.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,866

    Re: Alternative ways to calculate circular references?

    The spreadsheet is large enough that I did not take the time to reverse engineer the whole thing, but I expect that answering some of this involves a solid understanding of the algorithm you are trying to use. Since I don't understand the details of the algorithm, I can only speak in generalities.

    found that when I just have it filled to the third row it already gives wildly inaccurate results, even after thousands of iterations
    This sounds like the algorithm is diverging or oscillating rather than converging. Most if not all numerical, iterative algorithms like this have cases where they converge beautifully and others where they fail to converge for one reason or another. It is up to you as the programmer to know what scenarios lead to convergence/divergence so you can tell Excel how to look for divergence and what it should do when a given problem diverges. Off the top of my head, I see three generic directions to go when a problem diverges:
    1) The divergence indicates that no solution exists. In which case, stop trying, output "no solution," and move on to a problem that has a solution.
    2) The divergence indicates that I started with a bad seed value(s)/initial guess(es). In which case, come up with a better seed value(s) and try again.
    3) The divergence indicates that the algorithm is poorly suited to the problem. In which case, find a better, more stable algorithm.
    Since I do not understand the details of your problem or algorithm, it is difficult to know which of these three cases is at play in your example, and therefore, I cannot recommend a path forward.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Circular References
    By Koda925 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-23-2018, 10:56 AM
  2. UDF Help: Circular References
    By grturner in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-25-2016, 04:39 AM
  3. Replies: 2
    Last Post: 02-23-2014, 06:06 PM
  4. calculate Circular References
    By jfoote in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2009, 02:39 PM
  5. Those Circular References...
    By JeremyH1982 in forum Excel General
    Replies: 4
    Last Post: 05-22-2006, 05:55 PM
  6. Alternative Ways to Spellcheck a Range
    By Jay in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2006, 04:50 PM
  7. Circular references
    By R.Hocking in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-02-2006, 02:55 PM

Tags for this Thread

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