Smart questions
Smart people
 Find A ForumFind An Expert
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Remember Me

Are you an
Engineering professional?
Join Eng-Tips now!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Just copy and paste the

#### Feedback

"...I train people in ACCESS. I make sure they know about these forums, give them some training on how to use the site, and have a shortcut to it on their PC's..."

#### Geography

Where in the world do Eng-Tips members come from?

# Searching points within a bounding circle in excel(2)

 Forum Search FAQs Links Jobs Whitepapers MVPs
 waughe (Petroleum) 25 Nov 11 23:24
 I am trying to find points in an excel database that lie within a circle with a 50 mile radius.  I have over 100,000 points in the database all given in lat/long form.  The center of the circle will be lat/long (x,y).  How do I write a macro that finds the points bounded by this formula?
 cloa (Petroleum) 5 Dec 11 20:45
 MortenA (Petroleum) 6 Dec 11 8:09
 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
 DRMABZ (Geotechnical) 7 Dec 11 9:48
 Just to add to the very good suggestion.You can rap your distance calculation into an "if" function and have it return 0 or a 1 e.g. =1 if within your distance (circle). You can then use the filter function to produce a list, which if required could be copied into another sheet. The filter function will be very useful for large non-sequential lists.

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!