+ Reply to Thread
Results 1 to 5 of 5

case counter in Excel 2007?

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2007
    Posts
    2

    case counter in Excel 2007?

    Hi all. New member with what I suspect is a fairly old problem (but could not find via keyword search)...

    I have been tasked with creating a case counter variable in a very large spreadsheet (5000+ rows) that contains data at two levels -- people and cases. Each person in the file can have multiple cases of data (in separate rows), but the majority of the people only have a single case (row). For the purposes of this project, the Case counter should only show a value for the persons who have multiple cases. Otherwise, the case cell should be blank. Example below...

    Person Case
    1
    2
    3
    4 1
    4 2
    5
    6
    7
    8
    9 1
    9 2
    9 3
    9 4
    10
    11
    12

    To verbalize the above: Person #4 has two cases, so the first case is labelled as case 1 and the second case is labelled as case 2. Person #9 has four cases, so they are labelled 1,2,3,4 in order to differentiate each of the cases for that person from each other.

    The method that I am looking for seems to deviate a bit from the standard use of the COUNT functions (since I don't just want a total case count for each person but rather something that looks more like a running total that resets each time a new person is found). I have been fumbling around with the MATCH and VLOOKUP functions trying to piece together a custom formula that could be copied down in the case column, but am struggling to put the whole thing together. Frankly, I'm not even sure this is the correct forum for this post, but I know you will tell me to move my thread if it isn't.

    Thanks for your time and support.

  2. #2
    Forum Contributor
    Join Date
    08-01-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: case counter in Excel 2007?

    i answered something similar here
    http://www.excelforum.com/excel-form...html?p=2924329

  3. #3
    Forum Contributor
    Join Date
    08-01-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: case counter in Excel 2007?

    so something like this
    =COUNTIF($A$2:A2, A2)

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

    Re: case counter in Excel 2007?

    with data starting a2 in b2 =IF(COUNTIF(A:A,A2)>1,COUNTIF($A$2:A2,A2),"")
    "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

  5. #5
    Registered User
    Join Date
    09-10-2012
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: case counter in Excel 2007?

    Thanks to both ajm123456789 and martindwilson. Problem solved!

+ 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