Applies ToExcel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web

To insert geographic data into Excel, you first convert text into the Geography data type. Then you can use another column to extract certain details relative to that data type, like Total population, or Time zone.

Note: The Stocks data type is only available to Microsoft 365 accounts or those with a free Microsoft Account. You must also have the English, French, German, Italian, Spanish, or Portuguese editing language added to Office Language Preferences.

Use the Geography data type

  1. Type some text in cells. For example, type a country, state, province, territory, or city name into each cell.

  2. Then select the cells.

  3. Although it's not required, we recommend creating an Excel table. Later on, this will make extracting online information easier. To create a table, go to Insert > Table.

  4. With the cells still selected, go to the Data tab, and then click Geography.

  5. If Excel finds a match between the text in the cells, and our online sources, it will convert your text to the Geography data type. You'll know they're converted if they have this icon: Linked record icon for Geography

  6. Select one or more cells with the data type, and the Insert Data  button Add Column button will appear. Click that button, and then click a field name to extract more information. For example, pick Population.

  7. Click the Insert Data  button again to add more fields. If you're using a table, type a field name in the header row. For example, type Area in the header row and the Area column will appear with data.

Tips: 

  • To see all of the fields available, click the geography icon ( Linked record icon for Geography ) or select the cell and press Ctrl+Shift+F5.

  • If you see Question mark icon instead of an icon, then Excel is having a hard time matching your text with data in our online sources. Correct any spelling mistakes and when you press Enter, Excel will do its best to find matching information. Or, click Question mark icon and a selector pane will appear. Search for data using a keyword or two, choose the data you want, and then click Select.

  • You can also write formulas that reference data types.

See also

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.