+ Reply to Thread
Results 1 to 6 of 6

Cumulative Sum

  1. #1
    Registered User
    Join Date
    12-31-2008
    Location
    Brighton, England
    MS-Off Ver
    Excel 2000
    Posts
    3

    Cumulative Sum

    Hopefully my title isn't misleading (or just plain incorrect, its been a while since i did maths).
    Honestly I'm fairly new to excel, but after breezing through the new users forum i belive this question goes a bit beyond that.

    I have, for my formula, 2 constant values a and x, I then also have a variable, n.

    The formula I'm trying to convert into excel terms is

    SIGMA (with respect from 1 upto n) ((1-x)^(1-n) * x)*a

    Unfortunatly thats not drastically inteligable so i've attached a picture file that should explain it in more understandable terms.

    Now the problem im having is, sigma is a cummulative funtion, which in this example is relative to the variable n, firstly I don't know what formulas I would have to use in order to get a sigma/summination function, and secondly I am uncertain of how to link it to a variable range (i would guess along the count, offset side of things?)

    Hopefully something in their is understandable.
    (annoyingly the neater picture I had preped is too large a file to be used, so I had to resort to a scanned pdf, sorry about that)

    Thanks,
    Fraser
    Attached Files Attached Files
    Last edited by Fraser Clark; 12-31-2008 at 07:41 AM. Reason: Grammer

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi, and welcome to the forum.

    I don't know of an inbuilt Sigma type function in standard Excel, but no doubt a user defined function (UDF) in Visual Basic could be written. Before doing that though does the following worksheet solution help.

    In A2 enter your x constant, in B2 your a constant and in C2 =Max(A5:A104)

    In A5 to A14 enter your n numbers starting at 1 and presumably incrementing by 1, ending in 10. Now in B5 and copied down enter
    Please Login or Register  to view this content.
    and finally in B4 enter =Sum(B5:B104)

    If that gives you what you're looking for and you prefer a UDF solution, then post back.

    Regards

  3. #3
    Registered User
    Join Date
    12-31-2008
    Location
    Brighton, England
    MS-Off Ver
    Excel 2000
    Posts
    3
    Thanks for the swift response,

    one quick quible, your code;
    =(((1-$A$2)^A5-1)*$A$2)*$B$2

    is misfortunatly miss a pair of brackets around the power (A5-1) which lead me to be highly confused as to why (what i thought were) identical formulas kept giving me highly diffrent answers. But none the less, a quick fix and thats to you i now am up and running. I must confess i had totally forgotten about the max command, which is allowing me to produces the extra lines wonderfully quick.

    Whilst it would be nice to a Sigma command, its not entirely vital, just one quick question. Say i have the spread for the next 30 values or so, but i just want to look at the sum of the first say 12, what would the formula to sum the first "x" (12) cells in the row (starting from B5) where x can be selected or typed into a diffrent cell?

    Again thanks,
    Fraser.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi,

    I realised that the =Count() in c2 wasn't actually being used in the sum formula. If you use c2 to hold the variable n, then in B4 use

    Please Login or Register  to view this content.
    Rgds

  5. #5
    Registered User
    Join Date
    12-31-2008
    Location
    Brighton, England
    MS-Off Ver
    Excel 2000
    Posts
    3
    Wonderful!

    Thanks for that and have a good New Year!

    Regards,
    Fraser.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi Fraser,

    Thanks for the feedback. Please mark the thread Solved and if you wish rate the answer with the 'scales' icon. Have a happy NY.

    Rgds

+ 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