+ Reply to Thread
Results 1 to 10 of 10

Count unique occurences for per ID for multiple ID

  1. #1
    Registered User
    Join Date
    10-09-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    13

    Count unique occurences for per ID for multiple ID

    In sheet1 I have several rows with the same identifier. I want to count up the number of unique occurrences in a range for each id.

    e.g. Sheet1

    A B C D E

    1 ID_1 PRD LFT TGB DEC

    2 ID_1 DEC STF PRD ABG

    3 ID_1 DEC PRD ABG LFT

    4 ID_2 PRD LYU TGB DEC

    5 ID_2 PRD TFL TGB DEC


    I would like to produce a summary in a separate sheet or area on sheet1 to look like:


    A B C D E

    1 PRD 2 (the number is 2 as PRD is unique once for each ID_x)

    2 LFT 1 (the number is 1 as LFT is unique once for each ID_1, doesnt appear for ID_2)

  2. #2
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Count unique occurences for per ID for multiple ID

    Please try

    Please Login or Register  to view this content.
    If you like my contribution click the star icon!

  3. #3
    Registered User
    Join Date
    10-09-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Count unique occurences for per ID for multiple ID

    Will try and let you know
    Thanks

  4. #4
    Registered User
    Join Date
    10-09-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Count unique occurences for per ID for multiple ID

    The code is almost working as expected.
    I am getting the count of 1 for every value in the results.
    i.e.
    A B C D E
    1 PRD 1
    2 LFT 1
    3 TGB 1
    4 DEC 1

    Thanks so far

  5. #5
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Count unique occurences for per ID for multiple ID

    kevin,

    I tried it with the example data provided by you and I got the correct results. I have tested again with the correct results. See enclosed workbook
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-09-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Count unique occurences for per ID for multiple ID

    I am attaching a snip of the actual file I am using with your code that has been addapted accordingly.
    I assume it must be something I have broken.

    What have I done wrong?
    Attached Files Attached Files

  7. #7
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Count unique occurences for per ID for multiple ID

    Yup,

    The below code still refers to column 1 of the example data (NOTE: two locations). You need to change that to the column number you want to consider as the ID.

    Please Login or Register  to view this content.

  8. #8
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Count unique occurences for per ID for multiple ID

    Kevin,

    Did you manage to get it working?

  9. #9
    Registered User
    Join Date
    10-09-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    13

    Thumbs up Re: Count unique occurences for per ID for multiple ID

    Hi,
    Managed to get it to work, THANKS!
    Saved my day!

  10. #10
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Count unique occurences for per ID for multiple ID

    Kevin,

    Great! May I please ask you to mark your thread as SOLVED (using the appropriate menu option from the Thread Tools menu) and to click the "Add Reputation" link underneath my avatar if you are happy with my contribution.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. trying to count unique occurences w/in data that matches multiple criteria
    By broro183 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-07-2006, 08:11 AM
  2. [SOLVED] List Unique Occurences and Count
    By Alan Beban in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 07:05 AM
  3. [SOLVED] List Unique Occurences and Count
    By Alan Beban in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 06:05 AM
  4. List Unique Occurences and Count
    By Alan Beban in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 04:05 AM
  5. [SOLVED] List Unique Occurences and Count
    By PGiessler in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM

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