Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Member Login

Come Join Us!

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

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

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

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 excelHelpful Member!(2) 

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
Better to post in the Engineering spreadsheets subforum

http://www.eng-tips.com/threadminder.cfm?pid=770
Helpful Member!  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<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
Helpful Member!  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.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!

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:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close