I originally posted this question on an ExcelIsFun youtube video, and the channel owner PM'ed me to ask me to post it here. I'm not exactly an Excel noob, but I really only know the basics and a few specific commands that might be a bit more advanced.
I have a sheet with 65 columns. The first column is the item name. The other 64 represent different attributes assigned to the item in the first column. Each column in a row can contain a null space if it does not have the attribute, or a 1 if it does. The catch is, each item on the left only (and always) has 4 out of the 64 attributes.
The 4 attributes can be totally different attributes from the other items, the same, or partially the same.
What I need to be able to do is sort the entire sheet so that items with the most attributes in common are in the top row. The list should procede downward with items that have fewer and fewer attributes in common. The last row would be the item with the least in common with any of the others.
The worksheet in question contains some fields that have private information, otherwise I'd post the actual excel file somewhere and link it here. But here's a simplified, comma delimited example using only the item column and 10 attribute columns (in this example, only 3 of the 10 columns can have 1's. Null cells are 0's. The first line is column labels:
Whether there are many or few animals with certain things in common isn't important in this example. What's important is the ability to sort the items in such a way that one can easily see the greatest degree of commonality at the top, and the least at the bottom.
How would I sort this list that way? And how would I do it for my 64-attribute (always 4 attributes for each item) table?
I'd prefer a method that is somewhat flexible in case the number of attributes goes higher or lower, or the number of allowed 1's per row changes.
Thanks!
I have a sheet with 65 columns. The first column is the item name. The other 64 represent different attributes assigned to the item in the first column. Each column in a row can contain a null space if it does not have the attribute, or a 1 if it does. The catch is, each item on the left only (and always) has 4 out of the 64 attributes.
The 4 attributes can be totally different attributes from the other items, the same, or partially the same.
What I need to be able to do is sort the entire sheet so that items with the most attributes in common are in the top row. The list should procede downward with items that have fewer and fewer attributes in common. The last row would be the item with the least in common with any of the others.
The worksheet in question contains some fields that have private information, otherwise I'd post the actual excel file somewhere and link it here. But here's a simplified, comma delimited example using only the item column and 10 attribute columns (in this example, only 3 of the 10 columns can have 1's. Null cells are 0's. The first line is column labels:
Code:
Animal, Brown, Black, Spotted, Two Legs, Mammal, Fish, Avian, Reptile, Healthy, Treated
Horse,1,0,1,0,1,0,0,0,0,0
Cow,0,0,1,0,1,0,0,0,1,0
Cat,0,1,0,0,1,0,0,0,1,0
Dog,1,1,0,0,1,0,0,0,0,0
Mouse,0,1,1,0,1,0,0,0,0,0
Chicken,0,0,0,1,0,1,0,0,0,1
Goose,1,0,0,1,0,1,0,0,0,0
Rabbit,1,1,0,0,1,0,0,0,0,0
Snake,0,0,1,0,0,0,0,1,0,1
Whether there are many or few animals with certain things in common isn't important in this example. What's important is the ability to sort the items in such a way that one can easily see the greatest degree of commonality at the top, and the least at the bottom.
How would I sort this list that way? And how would I do it for my 64-attribute (always 4 attributes for each item) table?
I'd prefer a method that is somewhat flexible in case the number of attributes goes higher or lower, or the number of allowed 1's per row changes.
Thanks!
Last edited: