View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid vezerid is offline
external usenet poster
 
Posts: 751
Default Tricky question with grouping and sorting

So, let me see if I understand you...

The third field (X, Y, Z) will determine which group should appear
first.
Those groups which have X in the *first entry* of the group will appear
first.
The groups will keep their internal ordering.
Thus, the second field essentially does not count much for our
ordering.

If I am correct in these, some questions:
What is the criterion of ordering for the XYZ? Alphabetic?
What is the criterion of ordering the 123? Numeric?

Regards,
Kostis Vezerides

ExcelNovice wrote:
Hey guys. I have a tricky question that I was hoping you could assist me with.

I have a spreadsheet full of data with each row representing an individual
event. Each row also belongs to a larger event. Think of it as if each row
represents a pitch in a baseball game and the groups of rows are each at-bat.
That is the best parallel I can think of.

I am trying to sort these "at-bats" by what happens on a certain "pitch"
without breaking up the "at-bats."

I'll try to put it another way... I have 100 rows of data, broken up into
groups of 5. The data that is in the first row of every group of 5 is the
most important data and I want to sort by that. Is there a way to rearrange
the groups of 5 rows without reordering the individual rows.

And yet another way... I have the following rows on a spreadsheet:
1-A-X
1-B-X
1-C-Y
1-D-Z
2-A-Y
2-B-Z
2-C-Z
2-D-X
3-A-X
3-B-Y
3-C-X
3-D-Y
4-A-Y
4-B-Z
4-C-X
4-D-Y

The number is the section, ABCD is the group, XYZ is the subgroup. I need to
reorder those rows based on what is in the XYZ subgroup but the section
always has to stay together and the group order can not change.

I want to reorder it based on what is in the A group. So it should end up
looking like:

1-A-X
1-B-X
1-C-Y
1-D-Z
3-A-X
3-B-Y
3-C-X
3-D-Y
2-A-Y
2-B-Z
2-C-Z
2-D-X
4-A-Y
4-B-Z
4-C-X
4-D-Y

The sections stayed together and the group order didnt change, it just
reordered the sections based on what was in the subgroup.

I hope one of these explanations was clear enough to understand. Any help
would be greatly appreciated. Thank you.