How to Pull Country and City Data with Excel's Geography Data Type

Tap each step to see how to bring in country and city data automatically in Excel.

  1. Type a country or city name into a cell

    Enter the name of the country or city you want data for (for example, "France") into a cell.

  2. Select the cell and click the "Data" tab

    With the cell you just typed still selected, go to the "Data" tab on the ribbon.

  3. Click "Geography" in the Data Types group

    Clicking the Geography icon recognizes the text and converts the cell into a data card with a map icon.

  4. Use the "Insert Data" icon to pull in population, capital, and more

    Click the icon next to the converted cell to automatically bring in details like population, capital city, or area into a neighboring cell.

  5. Why it helps

    Instead of looking up basic facts like population or area for multiple countries or cities one by one, you can just type the names and let Excel fill in up-to-date information automatically.

One typo can point Excel at the wrong place

Because the Geography data type matches text against a real-world database, spelling the name correctly matters -- a slight misspelling can either fail to convert or match an unexpected location. If a name is ambiguous, like a city that exists in several countries, Excel shows a selection panel so you can confirm exactly which one you meant before pulling in any data.

The data refreshes, it isn't a permanent snapshot

Because Geography is a linked data type, the underlying data can be refreshed later from Data -> Refresh All, updating figures like population if the source has newer numbers. This makes it more reliable for long-lived reference sheets than manually typed values that quietly go out of date.

Frequently Asked Questions

What kind of data can I pull in?

Fields like population, capital, area, flag image, continent, and currency are available -- click the "Insert Data" icon to see the full list your version supports.

What if a city name matches more than one country?

When conversion finds multiple candidates, a selection panel appears on the right so you can pick the exact country or city you meant.