+ Reply to Thread
Results 1 to 7 of 7

Build a table of Continent, Country, County, State, and City

  1. #1
    Registered User
    Join Date
    03-03-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    31

    Build a table of Continent, Country, County, State, and City

    I am looking to build a table of Continent > Country > County / State > City so that when entering a City name into a cell, Excel autocompletes the corresponding row with the accompanying Continent - Country - County / State data. I suspect this would be too imprecise with (e.g. Perth in Scotland and Perth in Australia) so possibly enter Continent > Country and then city for the county / state to be autocompleted but either way this is an enormous data set possibly using index(match( or something cleverer coding somewhat slightly beyond my technical capability.

    I am open to any suggestion or proposals which anyone may have including if they had a data table already build? I have a list of Continent > Countries and ~10 countries with County / State > City already build which is build on indirect() drop downs but is not the most efficient way and loses a lot of data for location where i haven't build the county / State > City data.

    Any/all suggestion welcome including if thoughts are this is too ambitious for excel to manage? Thanks for any help in advance.

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: =index(match( > Continent - Country - County / State - City

    Ideally this would probably be in a database like Access - it's built for this type of thing

    What you have told us suggests it is simple enough for Excel

    Whether Excel can handle it well may be more down to the number of records and concurrent users than anything else
    How are you defining "city" - the smaller your "city" the bigger the database becomes
    How are you planning to use this database?
    How often is access required and by how many people?
    etc

    If a city is defined as having population over 100,000 = approx 4,000 cities in the world - which is not a lot of records - Excel can handle this easily.
    Last edited by kev_; 03-07-2018 at 03:35 PM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Registered User
    Join Date
    03-03-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    31

    Re: =index(match( > Continent - Country - County / State - City

    Kev,

    Sorry for the slow response, have been hectic at work and finally got back to this.


    How are you defining "city" - I haven't set a definition, if a parameter existed it would be major economical cities globally, you mentioned 4000 and i imagine that is well within the count i am looking at, in fact i suspect largest 500 cities in the world would be sufficient.
    How are you planning to use this database? - Excel is a sole access file (i.e. myself) which is then reporting out trend and patterns identified.
    How often is access required and by how many people? - Accessed daily but only by myself.

    What i lack if the Continent > Country > State/County/Governance/City structure for the hypothetical 500 and the excel code to simply enter the City name for the pre-dependent State/County/Governance > Country > Continent to auto-populate.

    Any thoughts or suggestions welcome. I have a feeling i am asking a little too much here but hope i'm wrong.

  4. #4
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,494

    Re: =index(match( > Continent - Country - County / State - City

    if you google "table (or list) of cities and countries" you get multiple free and paid examples of databases with cities.

    if it is only 500 cities I would problably take a rainy afternoon (or day) to find the information online,
    wikipedia also seems a good place to start..
    https://en.wikipedia.org/wiki/Lists_...ies_by_country
    or
    https://en.wikipedia.org/wiki/Lists_of_cities

  5. #5
    Registered User
    Join Date
    03-03-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    31

    Re: Build a table of Continent, Country, County, State, and City

    I have attached a spreadsheet which may help demonstrate what i'm hoping to achieve

    Essentially i am looking for a manual text entry of a city name into H2 where excel will then look up the accompanying Country / State, Country and Continent. I may be structuring this data and tabling poorly so very open to thoughts or suggestions.

    Thank you for any help in advance.
    Attached Files Attached Files

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: Build a table of Continent, Country, County, State, and City

    I believe for a search to function in your case, you will need to normalize your data. Here is a link to help you understand about database normalization. When a table is normalized you can then search effortlessly. With your current set up, there is no way for excel to provide you with the expected output. You may be better served using MS Access for this type of query.

    https://support.microsoft.com/en-us/...ization-basics
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Build a table of Continent, Country, County, State, and City

    Most of countries/cities on Wiki are not well organized (non-tabular form) so you'll need a lot of work to organize it all correctly

    here is an example of EU countries with cities and provinces (counties/regions/districts ... whatever) but not all.

    to see how it works you'll need fast internet connection and PowerQuery add-in
    Attached Files Attached Files

+ 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. City/ State/ Country to TimeZone conversion
    By vij8y in forum Excel General
    Replies: 3
    Last Post: 09-22-2014, 02:21 AM
  2. importing city state and country from a ZIPTASTIC website
    By nate02167 in forum Excel General
    Replies: 2
    Last Post: 09-10-2013, 11:06 AM
  3. I need Help to parse address city state zip and country if applicable for all fields
    By danpotash in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-01-2013, 03:16 PM
  4. Formaula to show specific State/City in a Country
    By Sarisha in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-16-2013, 12:01 PM
  5. [SOLVED] Zip code data that populates the city and county.
    By HeathHarlan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-13-2012, 03:38 PM
  6. Need to separate county and state
    By satoshi in forum Excel General
    Replies: 2
    Last Post: 09-15-2009, 02:17 AM
  7. Zip - State - County
    By dandigger in forum Excel General
    Replies: 2
    Last Post: 01-26-2005, 05:06 PM

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