+ Reply to Thread
Results 1 to 4 of 4

counting top 5 repeated zipcodes out of thousands of entries

  1. #1
    Registered User
    Join Date
    05-15-2018
    Location
    Houston, TX
    MS-Off Ver
    Office 2013
    Posts
    3

    counting top 5 repeated zipcodes out of thousands of entries

    I have a spreadsheet with thousands of lines of information. I would like to find the top 5 or 10 zipcodes out of all of the entries. I have found a way to sum them up using sumproduct but pulling out the top 5 seems to be the challenge. Anyone have any ideas?
    Thanks in advance for any help.
    Sid

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: counting top 5 repeated zipcodes out of thousands of entries

    Something like

    =INDEX(ZipCodes,MATCH(Large(Zipcode_counts,1),zipcode_counts,0))

    Change 1 to 2,3,4,5 for top 5 list

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: counting top 5 repeated zipcodes out of thousands of entries

    Use PivotTable.

    Put Zip code into row label field. And in data field add Zip code again but as "Count of".

    Then add Top 10 filter, set to Top 5, by item, Count of Zip

    0.JPG
    Last edited by CK76; 05-15-2018 at 01:11 PM. Reason: Added screenshot
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: counting top 5 repeated zipcodes out of thousands of entries

    I would approach it this way, say the column A is where the zip code list is and column G is blank.
    step 1 - copy the zip code list and paste it in col G
    step 2 - go to the data tab and highlight the col G list and use the remove duplicates function.
    step 3 - beside the new list in col G use a countif in col H where =countif(A:A,G1) then double click for it to count all the values in col G.
    step 4 - apply a filter to col G and H and filter on values in H descending.
    Other alternative would be to use a rank function (accounting for duplicates) to col H then somewhere put #s 1 through 10 in empty cell then use an index match against the #s 1 through 10 and the rank field.
    without a sample file it is hard to be more specific.
    Hope that helps.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

+ 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. [SOLVED] Lookup for repeated entries
    By Sekars in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-24-2017, 09:31 AM
  2. Replies: 2
    Last Post: 02-04-2016, 10:16 AM
  3. Warning for Consecutive repeated entries
    By LewisK in forum Excel General
    Replies: 5
    Last Post: 04-01-2014, 12:44 PM
  4. [SOLVED] Vlookup with repeated entries/categories
    By Mr.Fish in forum Excel General
    Replies: 6
    Last Post: 05-01-2012, 09:53 PM
  5. Lookups on repeated entries!
    By martin.mcgarry in forum Excel General
    Replies: 4
    Last Post: 06-18-2010, 10:23 AM
  6. data validation-entries are repeated
    By mduke in forum Excel General
    Replies: 3
    Last Post: 01-16-2009, 11:03 AM
  7. Stripping out repeated entries from a column
    By bluke in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2006, 12:43 PM

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