+ Reply to Thread
Results 1 to 3 of 3

Extract the coordonates from Google Maps Link

  1. #1
    Forum Contributor
    Join Date
    04-13-2017
    Location
    Buchares
    MS-Off Ver
    2016
    Posts
    117

    Extract the coordonates from Google Maps Link

    Hey guys, i'm having some problems extracting the coordonates from a tab link from google maps using vba function something like coordonate (link_from_cell_range,"X") , coordonate (link_from_cell_range,"Y")

    Random location Example :
    https://www.google.com/maps/@44.4299....066941,14.25z

    i would like to have :
    X = 44.4299073
    y = 26.066941
    z = 14.25 (not quite so important)

    The problem is that i have links like this :
    https://www.google.com/maps/place/Si...9!4d25.5623504

    The new coordonates would be :
    X = 45.3410878
    y = 25.5164495
    z = 13z (not quite so important)


    I have an idea about how to extract all the numbers from the string but i can't figure it out how to take numbers specific by their location (variable link)

    any ideas?

    Thanks ,

    Calin

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Extract the coordonates from Google Maps Link

    I have two approaches to this issue. The first is a series of formulas as shown in column B of the attached workbook. These could be "rolled up" into three separate formulas but they would be very long and difficult to understand and debug.

    The general approach is to use the find command to find the "@" symbol in the string, then find the subsequent "/" to "isolate" the coordinates (shown in cell B7). This string is further picked apart using commas as the separators.

    The second approach is to use VBA and the split command to get the pieces in a User Defined Function: GetCoordinates("LinkString","Type") where Type is X, Y, or Z. (See Cells B17:B19).
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    04-13-2017
    Location
    Buchares
    MS-Off Ver
    2016
    Posts
    117

    Re: Extract the coordonates from Google Maps Link

    Nice ! thank you that's exaclty what i wanted to have

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Google Maps API
    By Gamal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-20-2017, 02:17 PM
  2. VBA Route Calculator - Google Maps Api 22 Minutes quicker than Actual Google Website
    By lookingforhelp1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2015, 01:23 PM
  3. Need Macro to link GPS data from excel to Google Maps
    By JohnGrosse in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2015, 05:12 PM
  4. Replies: 4
    Last Post: 02-23-2014, 07:32 PM
  5. Help with inserting a link to google maps from cells in a spreadsheet
    By handhglassworks in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-21-2014, 09:50 AM
  6. Creating a link to view on google maps from cells
    By yenom2 in forum Excel General
    Replies: 3
    Last Post: 10-18-2012, 07:09 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1