Sep 29 2020 05:58 AM
What formula to sort an array within a worksheet, with one of the array columns as Sort criteria.
Example:
Double | 1.83 | M2 | 3 | 2 |
Double | 1.86 | M3 | 1 | 2 |
Double | 2.08 | M4 | 3 | 2 |
Double | 2.34 | M6 | 3 | 2 |
Single1 | 1.41 | M5 | 3 | . |
Single2 | 1.65 | M1 | 3 | . |
Sort this 6-row array so that column C is in ascending order (M1,M2,M3,M4,M5,M6)
Alan
Sep 29 2020 07:02 AM
Assume the table is in A1:E6. In cell G1, enter (hit Ctrl+Shift+Enter after keying/copying to the formula bar):
=IFERROR(INDEX(A$1:A$6,MATCH(SMALL(COUNTIF($C$1:$C$6,"<"&$C$1:$C$6),ROWS(G$1:G1)),COUNTIF($C$1:$C$6,"<"&$C$1:$C$6),0)),"N/A")
Then, copy down and across.
Sep 29 2020 01:29 PM