Can you get distance between two GPS location points from Google maps or some other way in Excel?

Paul B

Well-known Member
Joined
Feb 15, 2002
Messages
577
Using Excel 2003

I have a list of GPS data, Latitude in column I and Longitude in column J starting in row 3, if I put a Latitude and Longitude location in R1 and S1 is there anyway to get the miles between them to show up in column M? The date is in decimal format and example would be if I put 34.084317 in R1 and -83.729373 in S1 than with 34.68371778 in I3 and -83.70893544 in J3 M3 would show 55.6 miles, and fill in the miles in M for the rest of the data I have in columns I and J. If that can be done could the travel time also be put in another cell?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Straight miles would be =ACOS(COS(RADIANS(90-R1))*COS(RADIANS(90-I1))+SIN(RADIANS(90-I1))*SIN(RADIANS(90-R1))*COS(RADIANS(J1-S1)))*3959

To get the driving distance you'll need to use the Google API and you will need a Key.


Has some basic code.
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,500
Members
449,090
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top