Generating Google Maps URL with GPS Coordinates from sheet cells and Displaying Complete URL in a cell

FormulaGuy

New Member
Joined
Feb 5, 2018
Messages
2
Hi
I have a worksheet that lists physical locations and 2 respective columns that display the latitude and longitude coordinates for the location in that row. I am trying to automatically generate a respective URL in the cell adjacent to the coordinates columns that displays the complete URL including the coordinates of that row. Then when I convert the worksheet to a PDF, the URL will be active and the person reading the list in the PDF format can click on the respective URL and Google Maps will open showing the location to them.
I already have a Hyperlinks function set up so the user can click on it within Excel and Google Maps opens but when I convert to PDF, that is lost.

Referring to the sample sheet below, I am trying to generate and DISPLAY the URLs in Column C based on coordinates info in Columns A & B for each row. Then when I print the sheet in PDF, the listed URL will be active. (Also if the Excel user clicks on the same URLs in Column C, Googlemaps will open as well). Also if I edit the listing to add/remove rows or just update a GPS address, I need the URLs to update somehow.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Latitude[/TD]
[TD]Longitude[/TD]
[TD]URL Address[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]18.3[/TD]
[TD] 64.8[/TD]
[TD][TABLE="width: 396"]
<tbody>[TR]
[TD="class: xl65"]https://maps.google.com/?t=k&q=18.3,-64.8[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]18.4[/TD]
[TD] -65.0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I'm not handy with VBA but willing to try it out.
Thanks.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Thanks. I've been using that format to create the URL within Excel using the Hyperlink function.
In my sample worksheet above, i placed in Cell C2 this formula: =HYPERLINK(CONCATENATE("http://maps.google.com/?t=k&q=",A2,",",B2)).
Clicking on this cell/link within Excel opens Google Maps as needed and pins the GPS coordinates of A2,B2. However when I convert the excel File to PDF, the formula in C2 is seen as a formula and not the resulting web URL so it doesn't create an active URL in the PDF. If there is a VBA code or an excel function that can generate the URL with the coordinates from A2 and B2 and then place the actual URL in C2, that would convert in PDF to a working link?
 
Upvote 0
I would like to convert to a PDF with a working just like above, but have not found a solution. Exact situation as FormulaGuy above. Thank you.
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

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