Input data:
r1 | r2 |
---|---|
1 | 3 |
2 | 1 |
1 | 1 |
1 | 2 |
Output data:
r1 | r2 |
---|---|
1 | 1 |
1 | 2 |
1 | 3 |
2 | 1 |
Using SORT formula in excel, gives the result:
r1 | r2 |
---|---|
1 | 3 |
1 | 1 |
1 | 2 |
2 | 1 |
CodePudding user response:
Use SORTBY
, e.g.
=SORTBY(A2:B5,A2:A5,1,B2:B5,1)
or simply SORT
with an appropriate second parameter:
=SORT(A2:B5,SEQUENCE(,2))