I have a list of locations and people and their latitude and longitudes. I’m using this equation to calculate the distance between the two.
=SUM(60*ACOS((SIN(Lat1*PI()/180)*SIN(Lat2*PI()/180)+COS(Lat1*PI()/180)*COS(Lat2*PI()/180)*COS((Long2-Long1)*PI()/180)))*180/PI())
I would like to have a user form that when the person selects the location it will show them the nearest person. So basically you select a one location and the distance formula calculates all distances between it and the people and returns the closest person. Anyone have an idea of how I would do this?
Bookmarks