VBA/EXCEL-How to find distance between coordinates when having the list of latitude and longitude coordinates

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Solved3.00K views

I was looking at a tutorial on calculating distance between two coordinates. Link attached below. https://analystcave.com/excel-calculate-distances-between-addresses/#Calculate_distance_between_two_coordinates

In my case, i have the list of coordinates of latitudes and longitudes on spreadsheet (for about 59 stations). My ultimate goal is to find the roadway distance (mileage) and traveling time between all of the coordinates. I was hoping to do it by just using the VBA function without google API. Is this something possible?
How should i go about determining the duration using vba function?

Would appreciate if someone could help on this!

selected answer

Hi Mahli,

nope. Not possible without some Web API. You need to either use Google API or Bing API (or whatever the Microsoft version is called). Another option is to scrape some other website but not really and reason to do this.

Google API is free for first 25k queries and afterwards still cheap for every next query.

In my example you can get the duration and distance (driving etc.).

The only example where you don’t need an Web API is if you want to measure crow distance (“straight” line between places). Here is the link:

selected as best answer

Simply the best place to learn Excel VBA