+ Reply to Thread
Results 1 to 7 of 7

cumulative summing

Hybrid View

  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    cumulative summing

    Hi All,

    I'd really appreciate some help with a problem that I just cannot solve

    example

    Col........A......B......C......D......E......F......G......H......I......J......K
    Row1......2......6......4......2......4......3......0......0......5.....This row has random numbers
    Row2......2.....8......12.....14....18.....21..#N/A..#N/A..??(26)...This row sums previous number (Row2)+number above (Row1)=cumulative total

    problem... being what formula can I put in the ?? column to pick up the cumulative count?...

    When there is nothing to add to the cumulative total, I am telling Row2 to = #N/A because I need to chart Row2 and I don't want to chart 0's or repeat numbers

    ....can anyone please offer a non-VB solution to 'picking-up' where the count was lost...?

    Many thanks in advance

    nelg
    Last edited by nelg001; 06-18-2013 at 03:02 AM.

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

    Re: cumulative summing

    Try
    Formula: copy to clipboard
    =IF(B1 = 0, NA(), B1+A2)
    Never use Merged Cells in Excel

  3. #3
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: cumulative summing

    maybe something like this (I am going to assume you mis-named rows and columns, but the idea is the same either way) :
    in B2
    Formula: copy to clipboard
    =IF(B1=0,NA(),B1+A2)

    Copy across

    Hope this helps

    EDI-
    zbor beat me to it...lol
    Last edited by dredwolf; 06-18-2013 at 02:50 AM.
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  4. #4
    Registered User
    Join Date
    04-25-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: cumulative summing

    Thanks for the ideas...I probably haven't clarified my problem very well...
    With =IF(B1=0,NA(),B1+A2) the count won't restart from the number just before the first #N/A

    Hopefully I've clarified my problem... being what formula can I put in the ?? column to pick up the cumulative count?...

    Thanks again

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

    Re: cumulative summing

    Try this:

    Formula: copy to clipboard
    =IF(B1 = 0, NA(), B1+LOOKUP(99^99, $A$2:A2))

  6. #6
    Registered User
    Join Date
    04-25-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: cumulative summing

    OMG! that is awesome...can you teach me how the formula works please? LOOKUP(99^99, $A$2:A2))

    I've never encountered the "99^99,$A$2:A2

    You are a LEGEND! Thanks!

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

    Re: cumulative summing

    Sure...
    LOOKUP(99^99, your array) will return you LAST NUMBER of your array IGNORING errors.

    So from the array LOOKUP(99^99, {21, 8, 12, 14, #N/A, 18, 2, #N/A}) it will return 2
    First part 99^99 only need to be big enough that it won't appear in your array therefore LOOKUP will search that number until the end and when it can't find it it will return last known number.

    SUMing part is easy.

+ 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