I have a long list of locations in excel format and I need to calculate driving distance between these locations using lat&long. Is there any macro I can use. Cheers
Asked
Active
Viewed 2.1k times
1 Answers
11
from : link this is too simple
Miles:
=ACOS(COS(RADIANS(90-Lat1)) * COS(RADIANS(90-Lat2)) + SIN(RADIANS(90-Lat1)) *
SIN(RADIANS(90-Lat2)) * COS(RADIANS(Long1-Long2))) * 3959
Kilometers:
=ACOS(COS(RADIANS(90-Lat1)) * COS(RADIANS(90-Lat2)) + SIN(RADIANS(90-Lat1)) *
SIN(RADIANS(90-Lat2)) * COS(RADIANS(Long1-Long2))) * 6371

Hamid Hosseinpour
- 139
- 1
- 3
-
From Review: Welcome to Stack Overflow! Please don't answer just with source code. Try to provide a nice description about how your solution works. See: [How do I write a good answer?](https://stackoverflow.com/help/how-to-answer). Thanks – sɐunıɔןɐqɐp Oct 07 '18 at 07:51