Advanced sorting

Luki123

New Member
Joined
Feb 1, 2018
Messages
2
Hello everyone,
I have a problem with advanced sorting (or at least I hope it needs some more advanced formula).
Basically I will try to explain what I would like to achieve on the screenshot.
I would like to get to the table in blue using 1 array formula or two separate formulas using (for CODE and VALUE) but I have no clue how to do it :(.
Do you have any ideas?

Sorting%20issue.PNG


Thank you!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Apologies. Data below:


Book1
ABCDEFGHIJ
1DATA
2
3CODEDEPTBUILDINGROOMVALUE
4ASDA13123SHOULD BE
5ASDA123342
6SFDAC1551342RankCODEVALUE
7FR3B2212431SFDA1342
8ASDA215432ASD465
9FR3A13233FR323
10
11Rank with CODE's DEPT=A, BUILDING=1 and ROOM=* (any value)
12
13COUNTING CONDITION
14
15CODEDEPTBUILDINGROOMVALUECOUNT?
16ASDA13123YES
17ASDA123342YES
18SFDAA1551342YES
19FR3B221243NO (DEPT=B)
20ASDA21543NO (BUILDING=2)
21FR3A1323YES
22
23CODE's VALUES used in ranking
24
25ASD465
26SFDA1342
27FR323
28
29
Arkusz1
Cell Formulas
RangeFormula
B25=E16+E17
B26=E18
B27=E21
 
Upvote 0

Forum statistics

Threads
1,215,415
Messages
6,124,768
Members
449,187
Latest member
hermansoa

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