Hi all!
I'm currently stuck with this Google API Query.
As you may know you can get information about longitude, latitude etc. via Google API. This is done via this web query: "https://maps.googleapis.com/maps/api/geocode/json?address=NewYorkUSA" (example for New York).
But in my excel sheet I have many other cities left, therefore I'd like to do this automatically. It actually works nearly perfect with a slight modification of this guys' code: http://analystcave.com/excel-calcula...een-addresses/
And yes, I have seen his solution to getting the longitudes and latitudes. But that is written as a SUB and not as a function. Unfortunately I need this as a function for my specific usage :/
My modified code:
But if I then start this function as following, the value of the function is "40".![]()
Please Login or Register to view this content.
But the difference of one degree of latitude equals 110km, while I need an exact analysis of all digits.
City Latitude New York =GetLatitude(A2)=40
Therefore I fooled a bit around with following passage:
In my understanding the issue here is the search pattern which only gives whole numbers as output, therefore I changed it to:![]()
Please Login or Register to view this content.
I even checked it with a regex-analyzer and it worked. Unfortunately not with Excel 2007.![]()
Please Login or Register to view this content.
Has someone maybe an idea, how Excel could deliver the output with the whole decimal number?
Many thanks!!
Best Regards,
Lasse
Bookmarks