Home/Help/Excel
Microsoft Excel Add-in

Excel Documentation

Complete reference for all MapGO custom functions available in Microsoft Excel. Enrich your spreadsheets with geospatial data using simple formulas.

Getting Started

1

Install the add-in

Open Excel and go to Insert → Get Add-ins. Search for "MapGO" and click Add. The add-in works with Excel on Windows, Mac, and Excel for the web.

2

Connect your API key

Open the task pane via Home → MapGO, then paste your API key. Get your key from your dashboard.

3

Use formulas

Type any =MAPGO. formula in a cell. Excel uses dot notation (e.g., MAPGO.COUNTRY) instead of underscores. Put your coordinates in separate columns (e.g., A for lat, B for lng).

Requirements

  • Paid plan: Spreadsheet add-ins require a Starter, Professional, or Business plan.
  • Excel version: Excel 2016 or later, Excel for Microsoft 365, or Excel for the web.
  • Coordinates: Latitude (-90 to 90) and longitude (-180 to 180) in decimal format.
  • Internet connection: Required for API calls. Results are cached locally to minimize requests.

Excel vs Google Sheets naming

Excel custom functions use dot notation (e.g., MAPGO.COUNTRY) while Google Sheets uses underscores (e.g., MAPGO_COUNTRY). The functionality is identical across both platforms.

🌍Location Hierarchy

7 functions

MAPGO.HIERARCHY

Returns the full location hierarchy for coordinates. Includes all available levels: Continent, Country, Region, Subregion, District, Municipality.

Syntax
=MAPGO.HIERARCHY(lat, lng)
Example
=MAPGO.HIERARCHY(48.3, 5.03) → "Europe, France, Grand Est, Haute-Marne, Saint-Dizier, Doulevant-le-Chateau"
Returns:Text (comma-separated hierarchy)
MAPGO.CONTINENT

Returns the continent name for the given coordinates.

Syntax
=MAPGO.CONTINENT(lat, lng)
Example
=MAPGO.CONTINENT(48.3, 5.03) → "Europe"
Returns:Text
MAPGO.COUNTRY

Returns the country name for the given coordinates.

Syntax
=MAPGO.COUNTRY(lat, lng)
Example
=MAPGO.COUNTRY(48.3, 5.03) → "France"
Returns:Text
MAPGO.REGION

Returns the region or state name for the given coordinates.

Syntax
=MAPGO.REGION(lat, lng)
Example
=MAPGO.REGION(48.3, 5.03) → "Grand Est"
Returns:Text
MAPGO.SUBREGION

Returns the subregion (department, province, etc.) for the given coordinates.

Syntax
=MAPGO.SUBREGION(lat, lng)
Example
=MAPGO.SUBREGION(48.3, 5.03) → "Haute-Marne"
Returns:Text
MAPGO.DISTRICT

Returns the district name for the given coordinates. Not all countries have districts.

Syntax
=MAPGO.DISTRICT(lat, lng)
Example
=MAPGO.DISTRICT(48.3, 5.03) → "Saint-Dizier"
Returns:Text
MAPGO.MUNICIPALITY

Returns the municipality name for the given coordinates. Not all countries have municipalities.

Syntax
=MAPGO.MUNICIPALITY(lat, lng)
Example
=MAPGO.MUNICIPALITY(48.3, 5.03) → "Doulevant-le-Chateau"
Returns:Text

🌊Coastline Distance

3 functions

MAPGO.COASTLINE

Returns the distance to the nearest coastline as a formatted string.

Syntax
=MAPGO.COASTLINE(lat, lng)
Example
=MAPGO.COASTLINE(48.8566, 2.3522) → "340.2 km"
Returns:Text
MAPGO.COASTLINE_KM

Returns the distance to the nearest coastline in kilometers as a number.

Syntax
=MAPGO.COASTLINE_KM(lat, lng)
Example
=MAPGO.COASTLINE_KM(48.8566, 2.3522) → 340.2
Returns:Number
MAPGO.COASTLINE_MI

Returns the distance to the nearest coastline in miles as a number.

Syntax
=MAPGO.COASTLINE_MI(lat, lng)
Example
=MAPGO.COASTLINE_MI(48.8566, 2.3522) → 211.4
Returns:Number

🗺️Border Distance

3 functions

MAPGO.BORDER

Returns the distance to the nearest country border as a formatted string.

Syntax
=MAPGO.BORDER(lat, lng)
Example
=MAPGO.BORDER(48.8566, 2.3522) → "258.3 km"
Returns:Text
MAPGO.BORDER_KM

Returns the distance to the nearest country border in kilometers as a number.

Syntax
=MAPGO.BORDER_KM(lat, lng)
Example
=MAPGO.BORDER_KM(48.8566, 2.3522) → 258.3
Returns:Number
MAPGO.BORDER_MI

Returns the distance to the nearest country border in miles as a number.

Syntax
=MAPGO.BORDER_MI(lat, lng)
Example
=MAPGO.BORDER_MI(48.8566, 2.3522) → 160.5
Returns:Number

📏Point-to-Point Distance

4 functions

MAPGO.DISTANCE

Returns the distance between two coordinate points as a formatted string.

Syntax
=MAPGO.DISTANCE(lat1, lng1, lat2, lng2)
Example
=MAPGO.DISTANCE(48.85, 2.35, 41.89, 12.49) → "1,105.3 km"
Returns:Text
MAPGO.DISTANCE_KM

Returns the distance between two points in kilometers as a number.

Syntax
=MAPGO.DISTANCE_KM(lat1, lng1, lat2, lng2)
Example
=MAPGO.DISTANCE_KM(48.85, 2.35, 41.89, 12.49) → 1105.3
Returns:Number
MAPGO.DISTANCE_MI

Returns the distance between two points in miles as a number.

Syntax
=MAPGO.DISTANCE_MI(lat1, lng1, lat2, lng2)
Example
=MAPGO.DISTANCE_MI(48.85, 2.35, 41.89, 12.49) → 686.8
Returns:Number
MAPGO.BEARING

Returns the bearing (compass direction) from the first point to the second in degrees.

Syntax
=MAPGO.BEARING(lat1, lng1, lat2, lng2)
Example
=MAPGO.BEARING(48.85, 2.35, 41.89, 12.49) → 145.7
Returns:Number (0-360)

🔄Coordinate Conversion

2 functions

MAPGO.TO_DMS

Converts decimal coordinates to DMS (Degrees, Minutes, Seconds) format.

Syntax
=MAPGO.TO_DMS(lat, lng)
Example
=MAPGO.TO_DMS(41.8902, 12.4922) → "41°53'24.7"N 12°29'31.9"E"
Returns:Text
MAPGO.TO_UTM

Converts decimal coordinates to UTM (Universal Transverse Mercator) format.

Syntax
=MAPGO.TO_UTM(lat, lng)
Example
=MAPGO.TO_UTM(41.8902, 12.4922) → "33T 291888 4640642"
Returns:Text

Tips & Notes

  • Results are cached locally to minimize API usage. The same coordinates will return instantly after the first call.
  • Each formula call counts as one row toward your monthly usage limit.
  • Numeric functions (_KM, _MI) return numbers you can use in calculations. Text functions return formatted strings.
  • Location hierarchy depth varies by country. Some countries have only Country and Region, while others include Subregion, District, and Municipality.
  • Distance calculations use the Haversine formula and are approximate great-circle distances.
  • All geographic calculations are based on polygon shapefiles and should be considered approximations.
  • If you see #BUSY! in a cell, the function is still loading. Wait a moment for the result to appear.

Need help?

If you have questions or run into issues, we're here to help.

Contact Us