+ Reply to Thread
Results 1 to 6 of 6

IF/MIN Function To Get Around Circular Reference

  1. #1
    Forum Contributor
    Join Date
    06-08-2008
    Location
    USA
    MS-Off Ver
    Mac Excel 2016
    Posts
    103

    IF/MIN Function To Get Around Circular Reference

    I feel like this is fairly difficult to explain, but isn't all that hard to figure out -- I'm just hitting a wall:

    In the attached spreadsheet, I have four columns: Essentially, in the final ("Score") column, I have scores pretty easily based on the previous three columns. If the type is "A" or "C," I don't take into account its variation -- only if it's "B." If it's B, I take the previously determined value (column C) and subtract the variation from it first before I get the score. Otherwise, with "A" or "C," the 'Score' is just the 'Value' negative.

    All of those formulas are easy and work fine. The part where I'm running into trouble is that I want any 'Value' that's greater than or equal to 0 (in this case Rows 2-29) to be 0.2 points lower than the lowest 'Score' if the 'Value' is negative. In the attached spreadsheet, I can accomplish this easily by seeing that the lowest 'Score' for a negative 'Value' is -2.4150841 (Cell D30), so I can just make the true part of IF statement "$D$30-0.2" and it works exactly as I'd like it to -- but the problem is that I need the formula to act on its own somehow. The easiest way, if it worked, would be to somehow say if the value is negative, return the minimum score and subtract 0.2 from it -- but that obviously doesn't work, because it's in the same column, so you get a circular reference.

    I hope that makes some sort of sense! Can anybody help me get the same results as in my attached spreadsheet, but using something automatic instead of the manual "$D$30-0.2" in the =IF(C2>=0,$D$30-0.2,IF(A2="A",-C2,-C2+B2)) formula?

    SampleExcelProblem.xlsx

    Thank you!

  2. #2
    Registered User
    Join Date
    04-13-2012
    Location
    Leeds, UK
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: IF/MIN Function To Get Around Circular Reference

    You could use an additional calculation column (with the same calculation as in column D, minus the IF) that would then be the argument in MIN.

    Or use this in e.g. D2 and copy down:

    =IF(C2>=0,MIN(D$1:D1,D3:D$57)-0.2,IF(A2="A",-C2,-C2+B2))

    Sorry, I can't test it on the PC I'm using.

  3. #3
    Forum Contributor
    Join Date
    06-08-2008
    Location
    USA
    MS-Off Ver
    Mac Excel 2016
    Posts
    103

    Re: IF/MIN Function To Get Around Circular Reference

    Thanks! I'll test it out later tonight -- I have so many other columns in the entire workbook that I was hoping to keep the entire formula embedded in one, but if the only way is to add another column, I'm open to it.

  4. #4
    Registered User
    Join Date
    04-13-2012
    Location
    Leeds, UK
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: IF/MIN Function To Get Around Circular Reference

    Scratch that, it won't work. I'll try something and get back to you.

  5. #5
    Registered User
    Join Date
    04-13-2012
    Location
    Leeds, UK
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: IF/MIN Function To Get Around Circular Reference

    I think you will need an extra column as per the attached. Nothing to say you can't hide it though.

    SampleExcelProblem2.xlsx

  6. #6
    Forum Contributor
    Join Date
    06-08-2008
    Location
    USA
    MS-Off Ver
    Mac Excel 2016
    Posts
    103

    Re: IF/MIN Function To Get Around Circular Reference

    Thanks so much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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