+ Reply to Thread
Results 1 to 13 of 13

Function that gives huge numbers when correct solutions correspond to small numbers

  1. #1
    Registered User
    Join Date
    04-24-2011
    Location
    Portugal
    MS-Off Ver
    Excel 2010
    Posts
    6

    Function that gives huge numbers when correct solutions correspond to small numbers

    Hello,
    I am fairly new to excel so maybe my problem is easy to solve but I searched for a solution and I couldn't find it, so please help.

    I got a table (3 columns and 7 rows) where I have the following function to calculate the values that I need, 1 per row.

    "=IF(C6=0,0,(E6-$B$15)/C6)"

    the B15 cell corresponds to "=-SUM(D6:D12)"

    The problem is, when I insert a value in the "C" column excel exponentially increases the value for the function I mentioned earlier... this means that I got huge numbers when in fact small ones would be the correct ones.

    I enabled limited iterations because there are circular functions.

    You can find the table attached with some values entered so you can see the large numbers I get. I had macros in the original sheet which I removed because they don't matter for this problem,so if something appear just keep macros disabled.

    Don't know if I made myself clear but please let me know if you didn't understand.

    Would be very thankful if someone can help me!
    Attached Files Attached Files
    Last edited by emaniftw; 04-24-2011 at 02:51 PM.

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Function that gives huge numbers when correct solutions correspond to small numbe

    You have a circular reference.

    B15 is: =-SUM(D6:D12)

    every cell in D6:D12 refers to B15

    Your Excel options were set to allow maximum 30 iterations.

  3. #3
    Registered User
    Join Date
    04-24-2011
    Location
    Portugal
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Function that gives huge numbers when correct solutions correspond to small numbe

    yes, they are set for 30 iterations, would you change that?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Function that gives huge numbers when correct solutions correspond to small numbe

    i'd assume ( E6-$B$15)/6 is iterated 30 times since you have -SUM(D6:D12)
    you get (e6+sum(d6:d12))/c6 that's probably why its growing
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Function that gives huge numbers when correct solutions correspond to small numbe

    I have that feature disabled.
    I don't use circular references.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Function that gives huge numbers when correct solutions correspond to small numbe

    what exactly are you trying to calculate?

  7. #7
    Registered User
    Join Date
    04-24-2011
    Location
    Portugal
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Function that gives huge numbers when correct solutions correspond to small numbe

    @martindwilson

    even if I set it to 2-3 iteration the numbers are huge! have you checked the sheet I uploaded?

    @Cutter

    is there a way to make the same calculations without using a circular reference??


    Thanyou both

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Function that gives huge numbers when correct solutions correspond to small numbe

    if you allow iterations look at it this way
    in your sheet in a1 put =a1+1
    you will get the result of 30 ie it's calculated 30 times. as i asked before what exactly are you trying you calculate

  9. #9
    Registered User
    Join Date
    04-24-2011
    Location
    Portugal
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Function that gives huge numbers when correct solutions correspond to small numbe

    let me give you an example.

    imagine that you have different odds (corresponding to column A)
    you have a stake that you want to calculate (column B) so that the balance (column C) is the same for all the rows. But the balance depends on the stakes, so I have to calculate the sum of the stakes so the value X (balance) can be equal for all rows.

    you can see the attachment and try some numbers. Its easier to understand.

    Thank you.

  10. #10
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Function that gives huge numbers when correct solutions correspond to small numbe

    I have no idea what you are trying to accomplish.

    Maybe provide examples of values that should be showing and try to explain why those values are supposed to be reached.

    Just one more note on the iterations - the formulas will be calculated 30 times every time the sheet is calculated. Hit the F9 key to see it happen.

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Function that gives huge numbers when correct solutions correspond to small numbe

    i think you'd have to use solver

  12. #12
    Registered User
    Join Date
    04-24-2011
    Location
    Portugal
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Function that gives huge numbers when correct solutions correspond to small numbe

    for example

    A B C
    1 13.5 23.7 266.80
    2 16.5 19.4 267.00
    3 32.0 10.0 266.90

    being the A= odds, B=stakes, C=balance

    note that C= A*B-SUM(B1:B3)

    if I put these values in the table I made in excel it wont return these values..

  13. #13
    Registered User
    Join Date
    04-24-2011
    Location
    Portugal
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Function that gives huge numbers when correct solutions correspond to small numbe

    I never used that! I will try it! Thanks

+ 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