+ Reply to Thread
Results 1 to 4 of 4

keeping a running count

  1. #1
    Registered User
    Join Date
    09-29-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    13

    keeping a running count

    Dear forum,

    I have a spreadsheet that has numbers in column A (example = 31, 15, 159) I want to count the number (159) each time it occurs and keep a running count of it in say column B... example..... A1 = 159, A2 = 31, A3 = 159, so B3 would show (2) as the number 159 has appeared 2 times thus far...

    Any help would be greatly appreciated.
    Last edited by leo002000; 09-29-2009 at 11:15 AM.

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

    Re: keeping a running count

    =countif(a:a,159)
    "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

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

    Re: keeping a running count

    Like this?

    Put in B1
    =COUNTIF($A$1:A1,A1)

    and extend down

    or for previous too:

    =COUNTIF(A:A;A1)

  4. #4
    Registered User
    Join Date
    09-29-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: keeping a running count

    Many thanks for your swift reply, and advice...

    I ended up using =IF(A2=$K$2,COUNTIF($A$2:A2,$K$2),"")

    K2 = 159 and the if function removed the counting whilst the cell in column A did not have 159 (K2) in it... so now I only get the count when 159 (k2) appears...

    Many thanks, you put me on the right tracks, I am having a brain dead day I think.

    Best wishes

    Leo
    Last edited by leo002000; 09-29-2009 at 11:13 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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