Question with Grouping and Sorting

Mariner741

New Member
Joined
Sep 29, 2006
Messages
4
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.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,171,463
Messages
5,875,660
Members
433,146
Latest member
MinhTrang

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top