'I can't get latitudes and longtitudes for countries in Microsoft Excel [closed]

I want to add latitudes and longtitudes for countries in my sheet. I selected Country Name cell and then transform their data types as 'Geography' in the data section. Then, for example when I type =A2.Latitude , it couldn't get it. How can I add them? Thank you.

enter image description here



Solution 1:[1]

The 'Geography' Data Types do not include Latitude or Longitude (or any coordinate) values.

Convert your range to a table (select the top left cell and hit Ctrl+T)

Then convert to 'Geography' data type. Data >> Geography

When you click in a cell in the table, all of the available Geography fields will be presented in a pull-down:

enter image description here

You can get Latitude and Longitude values into Excel, but you will need to use an external Function, such as the 'A.CRE GEOCODING EXCEL ADD-IN' which can be found here: https://www.adventuresincre.com/geocoding-excel-add-in/

Solution 2:[2]

After converting the location data to geography, select the cell with the geographic data then hold down Ctrl+Shift+F5 keys and if Bing has the latitude and longitude data, they will appear from the dropdown list.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 GoodJuJu
Solution 2 TryingtoCode