Macro for calculating distance between 1000+ latitude and longitude of addresses

Kavya

New Member
Joined
Jul 17, 2015
Messages
1
Hi Everyone,

I am very new to Excel Vba and to this forum. I really need help in one of the macros that I want to write as part of my internship work.

I have a list (1125) of latitude and longitude of addresses. I want to write a macro, which will give me the distance between two latitudes and longitudes. And the same to be repeated for the remaining 1124 records(rows) .

I want it to be connected to either Bing maps or Google Maps who have a feature of geocoding API.

It would be great if someone could help me with this!

Many thanks,
Kavya
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I don't know VBA. But I have dealt with this in another post http://www.mrexcel.com/forum/excel-...ongitude-coordinates-find-closest-office.html
.

Perhaps all of this can help you and anyone else wanting to write a VBA solution.

http://en.wikipedia.org/wiki/Great-circle_distance
BlueMM: Excel formula to calculate distance between 2 latitude, longitude (lat/lon) points (GPS positions)
Latitude And Longitude


Excel 2012
ABCDEFGHI
20hmsLatitudehmsLongitude
21Calgary5124651.04611114324114.0566667
22Edmonton53324353.545281132921113.4891667
24Great Circle distance (km)280.5591
Sheet36
Cell Formulas
RangeFormula
E21=B21+C21/60+D21/3600
E22=B22+C22/60+D22/3600
I21=F21+G21/60+H21/3600
I22=F22+G22/60+H22/3600
C24=ACOS(COS(RADIANS(90-$E$21)) *COS(RADIANS(90-$E$22)) +SIN(RADIANS(90-$E$21)) *SIN(RADIANS(90-$E$22)) *COS(RADIANS($I$21-$I$22)))*6371
 
Upvote 0

Forum statistics

Threads
1,223,891
Messages
6,175,229
Members
452,621
Latest member
Laura_PinksBTHFT

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