Thanks:  0
Likes:  0

# Thread: Sorting A list by Groups

1. Hi

I am currently trying to sort a list that has been broken down into groups. The spreadsheet is to keep tally of the scores in a competition (both for individuals and team events)

Col A Col B Col C Col D
Name Team Name Score Blank
Name Team Name Score Blank
Name Team Name Score Subtotal of Team

This format is repeated for each team. I would like to sort the list to keep the teams (groups) together and end up with a list that represents 1st, 2nd, 3rd and so on. Can anyone shed some light on this for me

[ This Message was edited by: Magoo on 2002-05-04 23:48 ]

2. Select the columns you which to include then utilize the Data..Sort Item from the tool bar.

3. You really don't need to include a sub-total row of information for each team ... just use the ... Data..subtotal feature from the toolbar.

4. When I use the Data>Sort function the spreadsheet sorts all the subtotals and places them at the top of the spreadsheet and the rest of the data below. It separates the subtotal from the rest of the data

5. First do not put any totals or subtotals in the data.
Second : utilize the sort feature on data
Third: use the data ..subtotal.. feature to have excel create the subtotals for you.

6. Okey Dokey

I have done this, now I have a spreadsheet with all the team scores all subtotaled nicely . . . . .

Now, how do I sort all of this to give me a 1st, 2nd, 3rd, etc whilst keeping all my teams grouped together :?

7. How about having a seperate column for a teams total score then you can use that as one of the columns to sort by ?

example:
colA colb colc
teama 10 23
teamb 11 25
teama 13 23
teamb 14 25

the subtotal column .. in THIS example could be calculated with this formula in each cell of colC : =SUMIF(A:A,A:A,B:B)
A:A = col where team names are
B:B = col where scores are

Then all you would need to do is sort first by subtotal then by Team and Team individual game scores.

8. Also have a look at Pivot tables, they love this sort of thing....

specifically, you can total by team and have it sorted according to the results, with a bit of trial and error if you've not used them before

9. After many hours playing with the SUMIF function and many, many more hours looking at pivot tables I have reached the following solution.

If I simply calculate the subtotals for each team and place this subtotal into the last column next to each and every team member, then sort from there. This is a bit cumbersome, but works.

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•