+ Reply to Thread
Results 1 to 5 of 5

Cumulative Sum Excel

  1. #1
    Registered User
    Join Date
    04-28-2012
    Location
    Malta
    MS-Off Ver
    Excel 2003
    Posts
    1

    Cumulative Sum Excel

    i would like to ask, is there a function to sum a number for a given number of times retaining the cumulative total. For example 100 for 5 times, cumulative should read (100*1)+(100*2)+(100*3)+(100*4)+(100*5)=1500. Does this function exist where you input 100 and 5 and get a 1500 result?

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Cumulative Sum Excel

    You can do this with a user defined function.

    Please Login or Register  to view this content.
    Hit Alt F11 to get to the VBA editor
    Insert - Module
    Paste in the above code.
    Alt F11 back to Worksheet
    Enter into a cell =Cumulative(100,5)

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

    Re: Cumulative Sum Excel

    =A1*SUMPRODUCT(--(ROW($A$1:$A$200)<=A2),ROW($A$1:$A$200))
    where a1=100 and a2 is the number of times you want summed ie 5
    =1500
    or if
    a1=20
    a2=10
    =1100
    err why is this post in the introduce yourself forum?
    Last edited by martindwilson; 04-28-2012 at 02:26 PM.
    "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

  4. #4
    Registered User
    Join Date
    07-15-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Cumulative Sum Excel

    Hi I am new to this forum and I have a question on the cumulative sum function

    Year
    0 a*1.1^0
    1 a*1.1^1 + 1*1.1^0
    2 a*1.1^2 + a*1.1^1+a*1.1^0
    3 and so on

    Is there a formula can put this together? i tried the VBA code. The answer is not correct somehow.

    Thanks

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Cumulative Sum Excel

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    HTH
    Regards, Jeff

+ 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