Solved

clustering values by their distances from each other in excel

Posted on 2011-02-16
3
290 Views
Last Modified: 2012-05-11
Good afternoon!

the problem I think is probably very simple, but I am stuck,
I have a list of coordinates with their ID numebrs and would like to cluster the points that are at a distance less than 20 to each other.
To start with, I sort the data by the X then the Y column so that the points that would cluster would already be grouped together. On a separate column, I calculate the distances. From these I would like to then group the values by a letter name. From that I can then set up a table with the number of encounters for each group, together with the average values for each group.
I have to do that for several hundreds of sheets, and get the table with the averages for each one.
I have enclosed a spreadsheet as it is easier to follow I think!
Many thanks for any help!
 cluster1.xls
0
Comment
Question by:daniques
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 34914653
In cell I3 type the letter "A"

and in cell I4 paste the formula

=IF(SQRT(((G3-G4)^2)+((H3-H4)^2))<20,I3,CHAR(CODE(I3)+1))

and copy it down

Saqib
0
 

Author Closing Comment

by:daniques
ID: 34914946
Thank you! This is a neat and simple method of applying this formula to all the sheets.
I never thought of using the char functions, and it is a good way of starting.
Many many thanks
Danièle
0
 
LVL 45

Expert Comment

by:patrickab
ID: 34914955
How do you decide what letter to assign to a group or individual result?
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question