How to Create an Excel Hyperlink to Google Maps Using GPS Coordinates
Question details
The user wants to create a hyperlink in Excel that opens Google Maps based on GPS coordinates stored in a specific cell, ensuring that spaces and other special characters are properly URL-encoded.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Generating a list of clickable map links in a spreadsheet from stored latitude and longitude coordinates for quick location viewing.
- Observed behavior
- The user needs the exact formula to properly format the URL within the HYPERLINK function. Additionally, copying and pasting formulas sometimes changes quotation marks, causing formula errors.
Ensure your GPS coordinates are formatted correctly in the source cell (e.g., latitude and longitude separated by a comma). Check that your spreadsheet software supports the ENCODEURL function, or be prepared to use the SUBSTITUTE function as an alternative.
Use the HYPERLINK and ENCODEURL Functions
The cleanest way to ensure all spaces and special characters in your GPS coordinates are URL-safe is to combine the HYPERLINK and ENCODEURL functions.
The ENCODEURL function automatically translates spaces and punctuation into a URL-friendly format. This prevents web browser errors when passing complex coordinates or addresses to Google Maps.
Click on the empty cell where you want the clickable map link to appear.
Assuming your GPS coordinates are located in cell C1, type the following formula into the formula bar: =HYPERLINK("https://maps.google.com/maps?q="&ENCODEURL(C1),"Map it")
Press Enter to create the hyperlink. Click the resulting "Map it" text to test the link. It should open your default web browser directly to the specified location on Google Maps.

Use the SUBSTITUTE Function for Older Excel Versions
If you are using an older version of Excel that does not support the ENCODEURL function, you can use the SUBSTITUTE function to manually replace spaces with the URL-encoded space character.
Create Google Maps Links Easily in WPS Spreadsheet
WPS Spreadsheet fully supports advanced functions like HYPERLINK, ENCODEURL, and SUBSTITUTE natively. You can easily manage bulk location data and instantly create clickable Google Maps links in a familiar, lightweight, and free environment.
- 1. Open your data: Launch WPS Spreadsheet and open the document containing your GPS coordinates.
- 2. Select the target cell: Click on the empty cell where you want to generate the clickable link.
- 3. Enter the formula: Input the formula =HYPERLINK("https://maps.google.com/maps?q="&ENCODEURL(C1),"Map it") and press Enter.
- 4. Access Google Maps: Click the generated "Map it" text to immediately open the GPS location in your web browser.

Frequently Asked Questions
Why does my formula return an error after copying and pasting?
This is usually caused by "smart quotes" (curly quotes) being pasted instead of standard straight quotes. Spreadsheet applications cannot read curly quotes as formula text wrappers. Delete the quotation marks and retype them manually in your formula bar.
Can I use physical address text instead of GPS coordinates in the formula?
Yes. You can place a physical address in the referenced cell instead of coordinates. The ENCODEURL function will safely convert the address text (including spaces, commas, and special characters) into a URL-friendly format that Google Maps can process.
Why does clicking the hyperlink give a 'cannot open specified file' error?
This happens if the URL format is invalid or missing the protocol. Double-check your formula to ensure it strictly includes 'https://' at the very beginning of the Google Maps web address.
How do I change the display text from 'Map it' to something else?
The display text is defined by the second argument in the HYPERLINK function. Simply change the "Map it" portion of the formula to any text you prefer, such as "View Location", making sure to keep the text enclosed in quotation marks.




