Formula (or Macro) to caculate if one property is within a 5 mile radius of another?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,195
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,
Not sure if this is possible but I have a list of propertys I downloadd every day.
there location is show in Longatude and latatude.

I want to know how many are within a 5 mile radius of my Home. also in
in Longitude and latitude.

So the ideal solution would be two formulas.

1. that I use in Sheet "Home" that tells me How many Are within 5 miles of my home (in cell H3) the long & Lat is in D3 like this "
34.0843739, -117.602602" (both pages)
<strike>
</strike>
It it would be
A
My Home,
D3 Long and Lat
H3 Result of counting number of properties in sheet "Props" that have long and Lat in Column D3 that is within 5 miles of the long & lat of Sheet "Home" Cell D3

Please help if you can.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Try:
=ACOS(SIN(RADIANS(Lat1))*SIN(RADIANS(Lat2))+COS(RADIANS(Lat1))*COS(RADIANS(Lat2))*COS(RADIANS(Long1-Long2)))*RadiusEarth
Where Lat1, Long1 are the lat/lon of, say, your home, and Lat2, Long2 are the lat/lon of the other property. For RadiusEarth you can use 6367.465km or 3956.559mi, being the average of the distances around the equator and poles. Near enough for most purposes.

When mixing hemispheres, enter Northern and Western coordinates as positive, and Southern and Eastern coordinates as negative.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,477
Messages
6,125,038
Members
449,205
Latest member
Eggy66

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