+ Reply to Thread
Results 1 to 4 of 4

Identifying duplicates and their frequency

  1. #1
    Registered User
    Join Date
    07-24-2009
    Location
    minnesota, usa
    MS-Off Ver
    Excel 2002
    Posts
    10

    Identifying duplicates and their frequency

    Hello everyone. Attached is a sample table, which should be far easier to understand what I am trying to accomplish. So please try to use that for reference.

    What I am trying to do is to use a dataset with Column A "state" and Column B "value" to create a table showing the frequency at which values duplicate in the data. For example, if two distinct values (a-1, a-4) each show up 3 times, then the result would be that the Duplicate Frequency would be 3 and the Duplicates Occur would be 2.

    I am able to complete the intermediate step with using the CountIF formula to count the number of duplicates and place that in Column C "Times Value Appears". Then using pivot tables I can list the states, values, and count of times value appears.

    When I try to create the Results table, however, I set the Row to times value appears and the Data to count of times value appears. The issue is that when I do this, the count is being done across the identical values instead of treating them as a single group. The resulting totals are actually being multiplied by the times the value appears and not just treating it as a single occurrence.

    Many thanks for your help!
    Attached Files Attached Files
    Last edited by helpmeplz55; 10-12-2011 at 11:09 AM.

  2. #2
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    17,744

    Re: Identifying duplicates and their frequency

    Here is a solution that requires an intermediate set of "helper" columns. This provides the basis for creating another pivot table based on the first one. In the first pivot table you are counting frequencies. In the second pivot table you are counting frequencies of the frequencies, what you are ultimately saying you need.

    There may be a way to do this using complex formulas without having to use all that intermediate data.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    07-24-2009
    Location
    minnesota, usa
    MS-Off Ver
    Excel 2002
    Posts
    10

    Re: Identifying duplicates and their frequency

    This solution worked! Thanks so much 6StringJazzer.

    Ideally, I would like to keep things contained to pivot tables so that any information added in the future does not have to have the "helper" column formulas and ranges extended manually but it is much easier than making individual tables for each state and such.

  4. #4
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    17,744

    Re: Identifying duplicates and their frequency

    I really wanted to do this in one shot but couldn't figure it out. Pivot tables are essential when you don't know what the possible value of "values" are in advance. If in fact you do know, then that information would be helpful.

    The reason that the "helper" columns are required is to simply mirror the data from the first pivot table, but in a format that can be used to create the second pivot table.

    Your data is a bit mysterious but I note that each Value is unique to a single State. Is that always true? Do you know in advance all the possible Values and States? If so, then it might be possible to do this another way.

+ 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