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


New Member
Feb 5, 2018
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.

1LatitudeLongitudeURL Address
218.3 64.8
318.4 -65.0


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


New Member
Feb 5, 2018
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("",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?

Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...