+ Reply to Thread
Results 1 to 12 of 12

Running Total and Resets

  1. #1
    Registered User
    Join Date
    04-18-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    9

    Running Total and Resets

    Hello All,

    Pleased to be here. I'm a bit confused how to accompish a complex running total. I attached my example file for review. Currently in Column S I have a running total, of what is in Column I, it resets when column N = "Change". I would like it to reset to column I also when Column S is equal to or greater than 60 and if column K has changed. If column K hasn't changed keep the running total going. I hope I was able to explain myself. If I can explain further if you need it. Thanks in advanced.

    James
    Attached Files Attached Files
    Last edited by HyMay1180; 04-20-2011 at 03:50 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Running Total and Resets

    Does this do what you want?
    In S2;
    =IF(OR(O2="Change",S1>=60,K2<>K1),I2,S1+I2)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    04-18-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Running Total and Resets

    Quote Originally Posted by ChemistB View Post
    Does this do what you want?
    In S2;
    =IF(OR(O2="Change",S1>=60,K2<>K1),I2,S1+I2)
    Thanks Chemist. I'm working through your formula, I think you meant O2 to be N2? Thanks.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Running Total and Resets

    Yes, sorry about that.

  5. #5
    Registered User
    Join Date
    04-18-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Running Total and Resets

    Hi Chemist. Thanks for the formula. It is reseting too many times. It is reseting everytime column k is changing. I don't want it to reset every time k changes.

    If N is equal to "Change", that means the order has changed so restart the running total every time. But if N is not equal to "Change" then the order is not the same so continue the running total, only reset the count when column s is greater or equal to 60 and if column k has changed.

    Order of operation:

    First look at column n to look for "Change"
    Then look at column s for 60 or greater
    Then look at column k for a change

    Thanks for you help.

  6. #6
    Registered User
    Join Date
    04-18-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Running Total and Resets

    Quote Originally Posted by ChemistB View Post
    Yes, sorry about that.
    Hi Chemist. Thanks for the formula. It is reseting too many times. It is reseting everytime column k is changing. I don't want it to reset every time k changes.

    If N is equal to "Change", that means the order has changed so restart the running total every time. But if N is not equal to "Change" then the order is not the same so continue the running total, only reset the count when column s is greater or equal to 60 and if column k has changed.

    Order of operation:

    First look at column n to look for "Change"
    Then look at column s for 60 or greater
    Then look at column k for a change

    Thanks for you help.

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Running Total and Resets

    First look at column n to look for "Change"
    Then look at column s for 60 or greater
    Then look at column k for a change
    So do all 3 conditions need to be true for the reset?
    Or either Condition 1 or
    Condition 2 AND condition 3?

  8. #8
    Registered User
    Join Date
    04-18-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Running Total and Resets

    Condition 1 has priority, whenever this condition is met reset everytime. Condition 2 and 3 have to be true together. Thanks

  9. #9
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Running Total and Resets

    How about this?

    =IF(OR(N2="Change",AND(S1>=60,K2<>K1)),I2,S1+I2)

  10. #10
    Registered User
    Join Date
    04-18-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Running Total and Resets

    Hi Chemist,

    I really appreciate your help. The formulas are good, but then I get some unexpected results in some cases, which is okay because you going off what I'm saying. I have attached a new document with the desired results so that might help us out. Desired results are in column T. Again, thanks.

    James
    Attached Files Attached Files

  11. #11
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Running Total and Resets

    Okay, I put my equation in Col T (adjusted accordingly). First question, why do you expect a change at Row 21?
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    04-18-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Running Total and Resets

    Sorry it was a typo. The formula works perfectly! Yes! Thanks for all your help!

+ 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