Your database contains a lot of points (referencea) with data in the lat/long form - and you want to select those where the distance to another reference point is less than X miles?
First make sure that your coordinates uses the same units as your criteria. Then use pythagoras to calulate the distance then select if<X.
You dont even need a macro. Just add the calculation in the next collum and use conditional formatting to highlight the matching points. If you wish to remove all non match, then write a macro, do the calc and erase all the non match. Use "record macro" to quickly determine the coding for navigation and deleting a row.
Best regards
Morten