+ Reply to Thread
Results 1 to 15 of 15

trying to set formula to divide if criteria is met, keep getting a circular reference

  1. #1
    Registered User
    Join Date
    05-06-2020
    Location
    DENVER, CO
    MS-Off Ver
    PROFESSIONAL PLUS 2010
    Posts
    9

    trying to set formula to divide if criteria is met, keep getting a circular reference

    Hello all-
    I am a novice to excel and have stumbled my way through some reasonably advanced formulas, however, I can't figure this one out. I keep getting a circular reference. Here is the formula I have so far and then I'll explain what I am trying to do:
    =IF(B8="","",SUM(R8,S8,VALUE(X8),IF(D8=0.5,O8/2)))

    The last bold part is what I need to occur. I need the first part of the formula to calculate, then if D8=.5 to divide the result of the first part of the formula by 2. This formula is in cell O8 btw. The first half (non bold) works perfectly. Is what I want to accomplish possible? I've tried all I can to search for an answer, both here and the bigger webs and just can't seem to get close.
    Attached Files Attached Files
    Last edited by JORDANVC13; 05-06-2020 at 07:27 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    Is the reference to O8 near the end a typo? You said you want to divide the result of the SUM by 2, not cell O8 by 2...

    There are issues with your formula, but this needs to be clarified first.

  3. #3
    Registered User
    Join Date
    05-06-2020
    Location
    DENVER, CO
    MS-Off Ver
    PROFESSIONAL PLUS 2010
    Posts
    9

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    I apologize, I misspoke. The formula is in Cell O8 and that is also the cell I need to divide by two, once the first half of the formula is calculated. Is it better to create a reference cell for the first half and then divide/display that result in a separate cell?

  4. #4
    Registered User
    Join Date
    05-06-2020
    Location
    DENVER, CO
    MS-Off Ver
    PROFESSIONAL PLUS 2010
    Posts
    9

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    The basic idea of what I am trying to accomplish is this:
    The sheet is a payment calculator used to calculate my paycheck since my employer keeps screwing it up. there are a lot of different "IF" factors leading to the end result in cell O8, but at the end of all those calculations, I need that result to be divided by 2 if criteria is met in cell D8 (D8=.5). Sorry, Like I said, I am a novice and actually quite impressed I've made it this far. This is the last thing I can't figure out, was able to troubleshoot everything else. I really appreciate the help!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    If your formula is in O8, you cannot then divide O8 by 2 and not get a circ ref. Perhaps try this...

    =IF(B8="","",SUM(R8,S8,VALUE(X8)/IF(D8=0.5,2,1)))

    What is in X8?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    05-06-2020
    Location
    DENVER, CO
    MS-Off Ver
    PROFESSIONAL PLUS 2010
    Posts
    9

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    X8 is the result of another calculation. I have attached a sample of the file to the original post. Per forum rules, I hope.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    I am at work atm, and cannot open files here

    Is the answer in X8 already a value? If so, you dont need to use VALUE()

    Did you try my revised logic for your calc?

  8. #8
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    I downloaded the file.

    FDibbins' formula should work. As to why VALUE() is used for X8, it's because the IF function in that cell returns values like "$350", "$400", etc. instead of just 350, 400. Change those returns values to just numbers (no quotation marks, no dollars signs) and you won't need the VALUE(X8) function, just X8. You can then format X8 as currency with zero decimal places so you can see a $ sign if you want.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    Paul, thanks for the confirmation

    Jordan, I have opened your file and consolidated your formula in col X a little bit.
    1. you dont need to keep testing for Q6<=300&, you could just use...
    =IF(Q6>=300,Q6,IF(Q6<=300,IF(Y6="CVP","$350",IF(Y6="S","$400",IF(Y6="N","$300",IF(Y6="U","$300",IF(Y6="","$0")))))))

    2. This could be further simplified a little further to...
    =IF(Q6>=300,Q6,IF(Q6<=300,IF(Y6="CVP","$350",IF(Y6="S","$400",IF(OR(Y6="N",Y6="U"),"$300",IF(Y6="","$0"))))))

    3. As Paul pointed out, by using "$350" etc in your formula, you are returning a text answer. If you just used plan ol 350 and formatted as Currency, you could save some extra time in your "O" formula. So X woukd then become...
    =IF(Q6>=300,Q6,IF(Q6<=300,IF(Y6="CVP",350,IF(Y6="S",400,IF(OR(Y6="N",Y6="U"),300,IF(Y6="",0))))))

    So your "O" formula evolves to...
    =IF(B6="","",SUM(R6,S6,X6)/IF(D6=0.5,2,1))

  10. #10
    Registered User
    Join Date
    05-06-2020
    Location
    DENVER, CO
    MS-Off Ver
    PROFESSIONAL PLUS 2010
    Posts
    9

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    Oh wow, you guys are awesome thank you. I’ll try those ASAP and hopefully be done with this project. Really appreciate the help and I’ll let ya know how it goes!

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    Happy to help, looking forward to see how you make out

  12. #12
    Registered User
    Join Date
    05-06-2020
    Location
    DENVER, CO
    MS-Off Ver
    PROFESSIONAL PLUS 2010
    Posts
    9

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    FDibbins- Your formula works...almost. It is dividing the value in column X as needed, but I need it to divide the total in column O. Or alternatively, since that seems to create a circular reference, to divide columns R and S as well as X.
    Since O is a total of the value in those 3 columns. Does that make sense?

  13. #13
    Registered User
    Join Date
    05-06-2020
    Location
    DENVER, CO
    MS-Off Ver
    PROFESSIONAL PLUS 2010
    Posts
    9

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    For example- I've re-uploaded the file after applying your formula. However, if you look at line 12. "test" is the name. The formulas calculate correctly, until I enter .5 in column D. It divides it, but its off by $90. However, if I enter slightly different figures in line 13 "TEST 2", everything is calculated correctly....

  14. #14
    Registered User
    Join Date
    05-06-2020
    Location
    DENVER, CO
    MS-Off Ver
    PROFESSIONAL PLUS 2010
    Posts
    9

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    hmmm nevermind! seems to be working fine now. that was weird. Much thanks to you both, I would not have been able to do this without you! YOU ROCK!

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: trying to set formula to divide if criteria is met, keep getting a circular reference

    Great, thanks for the feedback

+ 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. Formula using Circular Reference
    By olga6542 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-16-2017, 01:37 PM
  2. Help with circular reference formula
    By texas tornado in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-03-2014, 02:54 PM
  3. Replies: 2
    Last Post: 02-23-2014, 06:06 PM
  4. Circular Reference when formulas reference end of row formula!
    By Spellbound in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-29-2009, 08:26 AM
  5. Replies: 1
    Last Post: 08-21-2007, 07:22 PM
  6. Circular Reference Formula Help
    By acebrown in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-21-2006, 08:25 PM
  7. circular reference formula
    By Abhi in forum Excel General
    Replies: 4
    Last Post: 03-12-2006, 10:30 AM

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