This article will explain how to link your addresses in Excel to Google Maps or Bing Maps.
Google Maps or Bing Maps
Both map services offer the ability to build custom URLs, but there are differences. For example,
- Bing Maps does not allow postal address as argument
- Satellite views are only possible with latitude and longitude (not with postal addresses)
The HYPERLINK function
First, you must create a custom URL with the HYPERLINK function to link your Excel data to Google Maps. It's the only way to see the result in your worksheet. The writing of this function is very simple
- Write the URL you want
- [optional] Customize the name to return in the cell.
If you want to customize the URL, you must fill the function's second argument.
How to Build a Custom URL for Google Maps
We will take these addresses as an example.
- To build the custom URL for Google Maps, we must start with this link
https://www.google.com/maps/search/?api=1&query=
- Then, we add the addresses in our cells, with the & symbol. We can use either the reference of a cell or the reference of a Table.
=HYPERLINK("https://www.google.com/maps/search/?api=1&query="&[@ Address]; "Google Maps")
- When you click on the link, you immediately open Google Maps, with the correct location in your browser😉👍
URL with latitude and longitude
Nowadays, collecting GPS coordinates has become more accessible with mobile devices. The Google URL differs from the previous URL with a search by postal address. The separator between latitude and longitude is the comma.
https://www.google.com/maps/@?api=1&map_action=map¢er=
When applied to the HYPERLINK formula, it gives
=HYPERLINK("https://www.google.com/maps/@?api=1&map_action=map&center=" &A2&","& B2)
CAUTION! The point is the only decimal separator allowed for the latitude and longitude (not the comma)
The Bing Maps writing is shorter. The separator between latitude and longitude is the tilde "~"
https://bing.com/maps/default.aspx?cp=latitude~longitude
=HYPERLINK("https://bing.com/maps/default.aspx?cp="&A2&"~"&B2)
Show Satellite View
You can only use latitude and longitude to display the result as a Satellite view. The option isn't available with postal addresses. With Google, you must add the parameter basemap=satellite
https://www.google.com/maps/@?api=1&map_action=map&center=latitude,longiture&basemap=satellite
With Bing, you must add the parameter &style=h (display the indications on the map) or &style=a (display only the image). The formula is
=HYPERLINK("https://bing.com/maps/default.aspx?cp="&A2&"~" &B2&"&style=h")
Adjust the zoom in your URL
You can also specify the zoom level with Google and Bing, always from a latitude and longitude. With Google, you just have to add the parameter &zoom with a value between 0 and 21 (default 15). The closer to 21, the closer the zoom.
=HYPERLINK("https://www.google.com/maps/@?api=1&map_action=map&center="&A2&","&B2& "&basemap=satellite&zoom=20")
With Bing, the zoom level is expressed with the &lvl parameter and a value between 1 and 20. The closer to 20, the closer the zoom.
=HYPERLINK("https://bing.com/maps/default.aspx?cp= &A2&"~"&B2&"&style=h&lvl=19")
Dave
31/12/2022 @ 18:33
Works great with google, thanks for the info. Is there a way to have multiple address shown on the map at one time?
Frédéric LE GUEN
31/12/2022 @ 19:48
The only way it's this solution https://youtu.be/cl7otv8hQ1g
Derek
25/08/2021 @ 23:54
=HYPERLINK("https://www.google.com/maps/@"&E30&"," &E31&",500m/data=!3m1!1e3")
Mikey
24/08/2021 @ 12:34
I aam using this link =HYPERLINK("https://www.google.com/maps/search/?api=1&query="&C19; "Google Maps")
Mikey
24/08/2021 @ 12:33
I am using this link =HYPERLINK("https://www.google.com/maps/search/?api=1&query="&C19; "Google Maps")
Mikey
24/08/2021 @ 12:33
HI, this worked great utill last week.
Google now asks for consent (also before) but the page is then refreshed every second or so and you can't continue to maps.