Lat and Long inputs to Google maps

shal_llly

New Member
Joined
Sep 25, 2017
Messages
8
Hi!

I would like some help where when a user types in the lat and long and clicks on a button, I would like the coordinates to show up in the google maps.

Any help will be appreciated! Thank you very much :)
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Here is one idea


Book1
ABCDE
1PlaceLongitudeLatitudeElevationLink
2Tuvalu-8.54212179.14111View Tuvalu On Google Maps
3Antigua17.0873-61.881211View Antigua On Google Maps
Sheet2
Cell Formulas
RangeFormula
E2=HYPERLINK("https://www.google.co.uk/maps/place/"&A2&"/@"&B2&","&C2&","&D2&"z", "View "&A2&" On Google Maps")
 
Upvote 0
OK, try this

Code:
Sub GotoMaps()
    Dim Lng As Double
    Dim Lat As Double
    Dim Ele As Double
    Dim Loc As String
    
    Lng = Range("B2").Value
    Lat = Range("C2").Value
    Ele = Range("D2").Value
    Loc = Range("A2").Value
    
    ActiveWorkbook.FollowHyperlink _
      Address:="https://www.google.co.uk/maps/place/" & Loc & "/@" & Lng & "," & Lat & "," & Ele & "z", _
      NewWindow:=True
      
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top