Can Excel calcluate miles between zip codes?
Provided you've got the lat & lon for the zip code centroids and you're happy to work with the assumption that the earth is a
perfect sphere (it isn't), you could use:
=ACOS(SIN(RADIANS(Lat1))*SIN(RADIANS(Lat2))+COS(RA DIANS(Lat1))*COS(RADIANS(Lat2))*COS(RADIANS(Long1-Long2)))*RadiusEarth
or
=2*ASIN(SQRT((SIN(RADIANS(Lat1-Lat2)/2))^2+COS(RADIANS(Lat1))*COS(RADIANS(Lat2))*(SIN(R ADIANS(Long1-Long2)/2))^2))*RadiusEarth
where your lat/lon cells are named as indicated and RadiusEarth = 6367.465km or 3956.559mi. In either case, you'll get very good
great-circle distance calculations.
Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------
"kcobb" wrote in message ...
|