+ Reply to Thread
Results 1 to 10 of 10

Cumulative sum formula

  1. #1
    Registered User
    Join Date
    12-09-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    18

    Cumulative sum formula

    Hi

    I need to make a cumulative calculation using the following figures.

    Number of transactions
    52
    71
    34
    87
    96

    For the first 100 transactions I will be charged $300, from 101 - 200 it will be $275, and for 201+ it will be $250.

    I need to populate the figure in each line so I can subtotal at the end.

    Any help would be great.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Cumulative sum formula

    With your transactions in column A starting in row 2 this formula in column B, starting at row 2, should work:

    =(MIN(30000,SUM(A$2:A2)*300)+MAX(0,MIN(27500,(SUM(A$2:A2)-100)*275))+MAX(0,(SUM(A$2:A2)-200)*250))-SUM(B$1:B1)

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,018

    Re: Cumulative sum formula

    Maybe this:
    Attached Files Attached Files
    Never use Merged Cells in Excel

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Cumulative sum formula

    Your formula gives different results to mine.

    I don't want to make judgements, but mine are more correct that yours

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,018

    Re: Cumulative sum formula

    So the main question is: what's expected result for Input 101

  6. #6
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Cumulative sum formula

    $30,275 - 100 transactions @ $300 + 1 transaction @ $275

    However, if they were laid out as two transactions:

    100
    1

    Your formula would correctly calculate the first transactional value at £30,000, but then would put the second at $30,275, because it would add the value of the 1st 100 transactions to the 2nd single transaction.

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Cumulative sum formula

    I must be reading this differently, see this workbook.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,018

    Re: Cumulative sum formula

    Quote Originally Posted by Andrew-R View Post
    Your formula would correctly calculate the first transactional value at £30,000, but then would put the second at $30,275, because it would add the value of the 1st 100 transactions to the 2nd single transaction.
    And that's how I understand cumulative SUM...
    But also we have now Marcol solution that also have sence...

    Now we only need to wait and see what user expect as result.

  9. #9
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Cumulative sum formula

    Place bets now!

  10. #10
    Registered User
    Join Date
    12-09-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Cumulative sum formula

    Hi

    Apologies for not responding yesterday, I got dragged into meetings all day. I got the correct values from Andrew R's initial response, thanks to all for your help and my apologies if my explanation wasn't clear. I guess the word cumulative confused the issue.

    Thanks again.

+ 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