Advanced Group Filtering

_____

New Member
Joined
Dec 1, 2017
Messages
1
Hello All, I am having a bit of trouble developing a proper sort that I will eventually be turning into a macro in which data is sorted in order within its own sub-group and then those sub-groups are sorted by the lowest value in the subgroup in descending (A-->Z) order. The data is then outputted to as per the original data (i.e the output isn't a subgroup, it is the original data that has been simply sorted).
Here is an example of what I am talking about utilizing playing cards:

Playing CardAssociated NumberCard SuitAsociated LetterAssociated Sort Number
Ace1HeartsH1
Two2DiamondsD2
Three3SpadesS3
Four4ClubsC4
Five5
Six6
Seven7
Eight8
Nine9
Ten10
Jack11
Queen12
King13

<tbody>
</tbody>

<tbody>
</tbody>

Sets of SuitsDrawn OrderDesired Suit OrderDesired Overall Order
D2S1
HeartsS7HeartsS4
H3C8H2S6
H5H2H3S7
H2D13H5S10
H5H2
DiamondsH2DiamondsH3
D13S4D2H5
D2S1D8D2
D8S10D9D8
D9D9D13D9
D8D13
SpadesS6SpadesC8
S1S1
S7S4
S10S6
S4S7
S6S10
ClubsClubs
C8C8

<tbody>
</tbody>

<tbody>
</tbody>

In this example the "Desired Suit Order" would be the sorting done into and within sub-groups and the "Desired Overall Order" is the desired results.

As can be seen the number of items in a group are dynamic. I would also like the number of sub-groups to be dynamic as well if, per this example, a 5th, 6th, etc. suit was added.

Any help / ideas are appreciated.

Thanks,

_____
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,215,831
Messages
6,127,142
Members
449,363
Latest member
Yap999

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
Back
Top