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 |
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))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With