Forum Discussion
Sorting col large to small with duplicates and putting into a vertical table
You may first create helper column to find the positions with with the large to small in totals (in P2)
=IFERROR((AGGREGATE(14,6,$B$10:$N$10*1000+COLUMN($B$9:$N$9),ROW()-ROW($P$1))/1000-INT(AGGREGATE(14,6,$B$10:$N$10*1000+COLUMN($B$9:$N$9),ROW()-ROW($P$1))/1000))*1000,"")
based on that position you may select values from other rows like
=IFERROR(INDEX($B$9:$N$9,0,$P2-COLUMN($A$9)),"")
Drag the all down till first empty cells appear.
I switched the values in row 12 to just numbers
RA | 0.00 | 0.00 | 0.00 | 16.67 | 50.00 | 60.00 | 0.00 | 36.36 | 66.67 | 28.57 | 0.00 | 0.00 | 0.00 |
Now when I run the helper column the zeroes give big numbers that lead to blanks in the results column
696 |
23 |
22 |
385 |
597 |
691 |
24 |
20 |
19 |
18 |
MHH |
MMH |
HHH |
LHH |
LMH |
LMM |
There may be no real way to do this but RA stands for advantage RN neutral and RD disadvantage
If I could somehow have the results column sort row9 such that first from large to small was the ones where RA was over 50 then the ones where RN was greater than RD followed by RN=RD and lastly RD sorted so the result would in this case be
MHH LHH LMH LMM HHH MMH LLH MMM LLL LLM
- SergeiBaklanApr 23, 2019Diamond Contributor
Answered from mobile previous time, open the computer and didn't catch how row 12 (RA) affects the Total (row 10) and what they shall be. Anyway, I reworked the formula to avoid helper column as
=IFERROR( INDEX($B$9:$N$9,1, AGGREGATE(14,6, 1/($B$10:$N$10=AGGREGATE(14,6,$B$10:$N$10,ROW()-ROW($P$1)))* COLUMN($B$10:$N$10), SUMPRODUCT(--($B$10:$N$10=AGGREGATE(14,6,$B$10:$N$10,ROW()-1))))-COLUMN($A$10)), "")
and now it shall not depend on which numbers are in Total row.
If again something is wrong please attach sample file there the issue is, from the text it's bit hard to understand without the knowledge what is behind your figures.
- SergeiBaklanApr 23, 2019Diamond Contributor