3

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

kolis29
  • 115
  • 2
  • 3
  • 11

1 Answers1

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
  • 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