+ Reply to Thread
Results 1 to 4 of 4

Cumulative Count Function

  1. #1
    Registered User
    Join Date
    03-28-2010
    Location
    New York
    MS-Off Ver
    Office 365
    Posts
    57

    Smile Cumulative Count Function

    Hi guys. I am a new member-i had a friend recommend excel forum and he said you guys were very knowledgeable about helping with excel.

    I have a (hopefully) quick question
    I have a column "M" with 2500 cells of either 0,-1,1. I want to create a column in N, that keeps a cumulative count of the number of times -1 or 1 is reached and resets every time a new value is reached (and disregards the value of 0)
    My data starts like this: I want it to say this:
    0 0
    1 1
    1 2
    0 0
    -1 -1
    -1 -2
    -1 -3
    1 1
    1 2
    1 3
    1 4
    1 5
    0 0
    etc...

    Thanks guys I really appreciate all of your help!

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Cumulative Count Function

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Cumulative Count Function

    Please Login or Register  to view this content.
    In N2 and down, =(M2<>0) * (M2 + (M2=M1) * N1)
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    03-28-2010
    Location
    New York
    MS-Off Ver
    Office 365
    Posts
    57

    Re: Cumulative Count Function

    THANK YOU SO! YOU GUYS ARE AMAZING! I like RoyUK's suggestion-i will do that from now on. Thanks a lot shg

+ 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