Solved

Distance between two zip codes using Excel

Posted on 2012-03-12
3
4,079 Views
Last Modified: 2012-03-12
Does anyone know how, via VBA or an advanced formula/function in Excel, to calculate the distance between two zip codes, if given the latitude and longitude coordinates like those on the attached?
ZIP-CODES.xlsx
0
Comment
Question by:BBlu
3 Comments
 
LVL 12

Accepted Solution

by:
Amick earned 450 total points
ID: 37711830
In miles:

=ACOS(COS(RADIANS(90-Lat1)) *COS(RADIANS(90-Lat2)) +SIN(RADIANS(90-Lat1)) *SIN(RADIANS(90-Lat2)) *COS(RADIANS(Long1-Long2))) * 3958.756


Source: http://bluemm.blogspot.com/2007/01/excel-formula-to-calculate-distance.html
0
 
LVL 7

Assisted Solution

by:leptonka
leptonka earned 50 total points
ID: 37712307
In this Linkedin discussion there were some other solutions about calculation distance between zip codes:
http://www.linkedin.com/groups/Distance-between-Zip-Codes-3843467.S.97120237?trk=group_search_item_list-0-b-ttl&goback=.gna_3843467
0
 

Author Closing Comment

by:BBlu
ID: 37712783
Thank you both very much. Awesome solutions!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now