Get Geography Data in Excel: Countries, States, and Cities

You can now get geography data in Excel. Excel can retrieve lots of data based on a ZIP code, a state, or a country. This is the fastest way to get the information into Excel!

In 2019, Excel added new functions through the use of data types. The first two data types are geography data types and stocks data types. These new data types allow Excel to pull information from databases. This is a brand new use for Excel.

Geography data types

To learn more about the stocks data types, see Stocks Data Types: Excel Now Retrieves Stock Prices!

The geography functions can work with several variables entered into Excel:

  • U.S. ZIP codes (other postal codes may work)
  • Cities anywhere in the world
  • States or provinces in the United States, Mexico, and Canada (other countries may also work)
  • Countries

To get started enter cities, states, provinces, countries, or ZIP codes. Then go to the Data tab and there are buttons for Stocks and Geography. Select the geography button and Excel will convert the them from text. See the following image.

Notice the Excel symbols for stocks and geography. The stock symbol is a bank and the geography is a map. See the image below.

Geography data types symbols

Cities and states

If you enter cities, Excel can pull 9 different data items for that city. It can also retrieve latitude, longitude, and time zone for each city. This is quicker than looking up each city one at a time.

If you enter states or provinces, Excel can retrieve 32 different data items. This includes more demographic data such as population and income numbers. See the image below.


Countries provide about 47 data items. These include similar information as states, but includes official languages, tax rates, inflation, and armed forces. This is now the fastest way to get this information in a spreadsheet.

Geography data types for countries

ZIP Codes

ZIP Codes provide similar information that cities do. A large metropolitan area may include several zip codes so it is a smaller area than the city. In this example, you could pull state, county, and city.

Geography data types tutorial

If you need a tutorial to understand how to include geography in Excel, see the video below.

Have you tried it yet?

Have you tried to use the new geography function yet? Is the another use that I have not discovered yet? Let me know in the comments below.

Do you want to learn Excel? Here are the Top 5 Place to Learn Excel for Free.

Jeff Mankin

Jeff Mankin teaches financial literacy. His website is

Recent Posts