Tricky sorting problem

Tipsey

New Member
Joined
Oct 28, 2022
Messages
17
Office Version
  1. 365
Platform
  1. Windows
I have a list of ID numbers in a table in a random order that I want sorted in ascending order. I also have a column in the table which has flagged certain people as working together and I would like the final sorted list to include the people working together directly following the person with the lowest I'd number from that group.

Ie.

2 a x
1 b
3 c 1
4 d
6 e x
5 f 1

Should sort to:

1 b
2 a x
6 e x
3 c 1
5 f 1
4 d

There is no way of knowing how many id's there will be or what the identifier used to group the different people will be.

VBA is not supported either.

Thanks for any you can provide.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
I was thinking this but x's and 1,s make it ricky all right
Book1
ABC
1IDNameGroup
21b
32ax
43c1
54d
65f1
76ex
Sheet1
 
Upvote 0
How about
Fluff.xlsm
ABCDEFG
1IdNameGroupIdNameGroup
22ax1b
31b2ax
43c16ex
54d3c1
66ex5f1
75f14d
Active
Cell Formulas
RangeFormula
E2:G7E2=LET(a,SORT(A2:C7,1),s,IF(a="","",a),SORTBY(s,IF(INDEX(s,,3)="",INDEX(s,,1),INDEX(s,MATCH(INDEX(s,,3),INDEX(s,,3),0)))))
Dynamic array formulas.
 
Upvote 0
Solution
Thank you for the quick reply, it is good to know my brain was heading in the right direction thinking let and match, but I appreciate the help figuring this one out.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,616
Members
449,238
Latest member
wcbyers

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