+ Reply to Thread
Results 1 to 12 of 12

Finding most common "city" in a column and present how many

  1. #1
    Forum Contributor
    Join Date
    11-10-2012
    Location
    Sweden, Stockholm
    MS-Off Ver
    MS Excel 365
    Posts
    175

    Finding most common "city" in a column and present how many

    I have a column with great numbers of cities mentioned

    visby
    visby
    stockholm
    stockholm
    stockholm
    uppsala
    uppsala
    uppsala
    uppsala

    The column consist with up to 1000 rows with cities, about 50 to 100 different cities.
    Want to pick up the top 5 common cities and numbers for these top 5.
    Is that possible?

    SEALPINO

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,508

    Re: Finding most common "city" in a column and present how many

    Create a simple Pivot Table which just counts the cities then Filter the top 5
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Finding most common "city" in a column and present how many

    Dear sealpino ,
    Refer attach file.
    In this file i have create column "A2:A51" Name
    In column "B" count with
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    IN column "C" most common with formula :
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In column "D" top 5 with formula :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    All formula drag down till end.
    if your range differ then you can change accordingly.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,508

    Re: Finding most common "city" in a column and present how many

    Example of analysis using a Pivot Table ...
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    11-10-2012
    Location
    Sweden, Stockholm
    MS-Off Ver
    MS Excel 365
    Posts
    175

    Re: Finding most common "city" in a column and present how many

    I got the formule concept.
    Is it possible to avoid this extra column B,
    I would like to have it straight in one box. for example "F1"
    Have issues later on when connecting other workbooks into this new workbook.

    SEALPINO
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,247

    Re: Finding most common "city" in a column and present how many

    You have marked the thread as solved. If you want more help, then remove the solved tag from your opening post.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Contributor
    Join Date
    11-10-2012
    Location
    Sweden, Stockholm
    MS-Off Ver
    MS Excel 365
    Posts
    175

    Re: Finding most common "city" in a column and present how many

    I am now using the solution with attached file Most_CommonTop5.xlsx made by AVK in this forum. Gratitude to him
    It works brilliant and it works in my xlsx format the way I am using it.
    However now I would like to add up a funtion to see the the split of females (1) and males (2) with the exception only present those with age older than 18.

    THANKS IN ADVANCE
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,594

    Re: Finding most common "city" in a column and present how many

    Paste the following formula into cell G2, then copy down and across:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  9. #9
    Forum Contributor
    Join Date
    11-10-2012
    Location
    Sweden, Stockholm
    MS-Off Ver
    MS Excel 365
    Posts
    175

    Re: Finding most common "city" in a column and present how many

    Hi It comes up a dialog box stating that there is some error in the formula. Try to check with Fx and see if it works.
    It does not.
    How about the parantheses are they correct?

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,594

    Re: Finding most common "city" in a column and present how many

    Seems to work fine on a copy of your spreadsheet (attached)
    Let us know if you have any questions.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    11-10-2012
    Location
    Sweden, Stockholm
    MS-Off Ver
    MS Excel 365
    Posts
    175

    Re: Finding most common "city" in a column and present how many

    Thanks for yur kindness.
    It works.
    The thing was that I have not an english version so it could not work. But when you put it in ittranslated correctly.
    THANKS. I tried to add an reputation but did not work. Have to add more rep to others....

    WELL THANK YOU JeteMC.

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,594

    Re: Finding most common "city" in a column and present how many

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

+ 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. Replies: 2
    Last Post: 09-30-2016, 12:57 PM
  2. Replies: 3
    Last Post: 02-07-2016, 03:58 AM
  3. [SOLVED] filling cell in column "a" if data present in column "b" issue.
    By timmatthews in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-07-2013, 11:43 AM
  4. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  5. Vlookup LEFT of the "^" sign, IF "^" is present in the string
    By ConstantinV in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-02-2013, 03:26 PM
  6. Replies: 3
    Last Post: 02-16-2011, 02:55 PM
  7. Formula for returning most common "word" in a row or column
    By Moshsoft in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-13-2009, 06:56 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