How to Link Addresses in Excel to Google Maps 🌎

Last Updated on 27/11/2024
Reading time: 3 minutes

Want to link addresses in Excel to Google Maps? If you have addresses or GPS coordinates in your cells, I'll show you how to visualize them in Google Maps.

Before we dive in, let's explore the Excel HYPERLINK function. As the name implies, it creates a hyperlink to a URL. The function is easy to use, with only two arguments.

  1. The URL: It can be an external link or a reference within the workbook.
  2. [Optional] Friendly Name: Assign a custom label for the link in the cell.

This article will show how to generate URLs based on your cell data. Let's check out some examples.

How to Build a Google Maps URL

Let's use these addresses and add URLs in column B for each one.

Example address before hyperlink with Google Maps

Google provides an API (Application Program Interface) to plot a location on Google Maps easily. An API is essentially a URL with added arguments. The Google Maps API is: https://www.google.com/maps/search/?api=1&query=

Combine this API with the cell content using an ampersand (&) to create a URL for each address.

=HYPERLINK("https://www.google.com/maps/search/?api=1&query="&[@ Address])

  1. Click on a link
  2. Google Maps opens in your browser at the specified location.
URL in Excel to open Google Maps

URL with Latitude and Longitude

You can also generate URLs using Latitude and Longitude, but you must meet these two requirements:

  • The decimal separator for latitude and longitude must be a dot (.)
  • The separator between latitude and longitude must be a comma.

The API format is https://www.google.com/maps/search/?api=1&query=lat,long

Google maps with Latitude and Longitude

If your local settings use commas as delimiters, force the dot by adding SUBSTITUTE(TEXT(B2, "@"), ",", ".") for each coordinate.

Formula with Latitude and Longitude with decimal comma

Note: Only a decimal point works as a separator for latitude and longitude.

Add More arguments to the URL

As you know, there are many ways to use Google Maps (satellite, road, traffic, set the zoom, ....). If you use one of these arguments, you must put your coordiantes in the center field

Here is the list of all the arguments you can set.

  • map_action=map (required): Specifies the map view type. Use map_action=map to display a map.
  • center (optional): Sets the map center using comma-separated latitude/longitude coordinates (e.g., -33.8569,151.2152).
  • zoom (optional): Adjusts the zoom level from 0 (world view) to 21 (close-up). Default is 15.
  • basemap (optional): Sets the map type. Options are roadmap (default), satellite, or terrain.
  • layer (optional): Adds a layer to the map, like none (default), transit, traffic, or bicycling.

Here are some examples and the result

Grand Canyon Google Maps
Big Ben Google Maps

Leave a Reply

Your email address will not be published. Required fields are marked *

How to Link Addresses in Excel to Google Maps 🌎

Reading time: 3 minutes
Last Updated on 27/11/2024

Want to link addresses in Excel to Google Maps? If you have addresses or GPS coordinates in your cells, I'll show you how to visualize them in Google Maps.

Before we dive in, let's explore the Excel HYPERLINK function. As the name implies, it creates a hyperlink to a URL. The function is easy to use, with only two arguments.

  1. The URL: It can be an external link or a reference within the workbook.
  2. [Optional] Friendly Name: Assign a custom label for the link in the cell.

This article will show how to generate URLs based on your cell data. Let's check out some examples.

How to Build a Google Maps URL

Let's use these addresses and add URLs in column B for each one.

Example address before hyperlink with Google Maps

Google provides an API (Application Program Interface) to plot a location on Google Maps easily. An API is essentially a URL with added arguments. The Google Maps API is: https://www.google.com/maps/search/?api=1&query=

Combine this API with the cell content using an ampersand (&) to create a URL for each address.

=HYPERLINK("https://www.google.com/maps/search/?api=1&query="&[@ Address])

  1. Click on a link
  2. Google Maps opens in your browser at the specified location.
URL in Excel to open Google Maps

URL with Latitude and Longitude

You can also generate URLs using Latitude and Longitude, but you must meet these two requirements:

  • The decimal separator for latitude and longitude must be a dot (.)
  • The separator between latitude and longitude must be a comma.

The API format is https://www.google.com/maps/search/?api=1&query=lat,long

Google maps with Latitude and Longitude

If your local settings use commas as delimiters, force the dot by adding SUBSTITUTE(TEXT(B2, "@"), ",", ".") for each coordinate.

Formula with Latitude and Longitude with decimal comma

Note: Only a decimal point works as a separator for latitude and longitude.

Add More arguments to the URL

As you know, there are many ways to use Google Maps (satellite, road, traffic, set the zoom, ....). If you use one of these arguments, you must put your coordiantes in the center field

Here is the list of all the arguments you can set.

  • map_action=map (required): Specifies the map view type. Use map_action=map to display a map.
  • center (optional): Sets the map center using comma-separated latitude/longitude coordinates (e.g., -33.8569,151.2152).
  • zoom (optional): Adjusts the zoom level from 0 (world view) to 21 (close-up). Default is 15.
  • basemap (optional): Sets the map type. Options are roadmap (default), satellite, or terrain.
  • layer (optional): Adds a layer to the map, like none (default), transit, traffic, or bicycling.

Here are some examples and the result

Grand Canyon Google Maps
Big Ben Google Maps

Leave a Reply

Your email address will not be published. Required fields are marked *