Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
grime
 
Posts: n/a
Default formula for putting points into groups


Column A is a list of up to 20 locations. Column B is the 'X'
coordinate, column C is the 'Y' coordinate.

The distance between any 2 points is figured with the ol'
squareroot("X" squared + "Y" squared).

Visually, if I graphed all those points, you may see groupings of
points, ie. any number of groups of points that are within a certain
distance of each other. There could possibly be only 1 group if all
the points were close, or 20 distinct groups if all 20 locations were
spread apart.

I would like Excel to be able to assign a group number to those groups,
based on a distance variable put in by the user. So if the user put in
a distance of 50 miles for example, Excel would go down my list of up
to 20 locations, and in column D, number each group of locations.

I am finding it easy to find out which locations are within that
distance variable of any location, but take the following example:

3 locations, all aligned vertically in a line: location 2 is 40 miles
from location 1, and location 3 is 40 miles from location 2, like in
the following diagram:

1

2

3

If the user enters 50 miles, it should place all 3 locations within the
same group since 1 and 2 are within the given distance, and 2 and 3 are
within the given distance, and location 2 exists in both.

Hard to explain, but hopefully I got my point across. Any help would
be greatly appreciated.


--
grime
------------------------------------------------------------------------
grime's Profile: http://www.excelforum.com/member.php...o&userid=19227
View this thread: http://www.excelforum.com/showthread...hreadid=475793

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
giving points by a result (function) Perttu O. Excel Worksheet Functions 2 October 3rd 05 08:21 PM
Formula Help Rick S Excel Discussion (Misc queries) 2 July 1st 05 02:25 AM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Howdo U copy a formula down a column, that uses data in another w. Need Help pasting a formula Excel Worksheet Functions 1 February 25th 05 06:04 PM
Problem with VBA returning the contents of a long formula. [email protected] Excel Discussion (Misc queries) 2 February 23rd 05 12:14 AM


All times are GMT +1. The time now is 08:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"