Forum Discussion
Sorting col large to small with duplicates and putting into a vertical table
SO here is the solution I came up with in the end
IN the Data set I added an infintessimal
ex. =(COUNTIF(TYPERN,BG$10)/BG$11)+(1/(COLUMN()*10^5))
Then I created 4 conditional helper columns to sort and return column numbers
Helper 1 The Best
=IFERROR(MATCH(LARGE(IF(($BC$13:$BL$13>=0.5),$BC$13:$BL$13,"glo"),ROWS($T$2:$T2)),$BC$13:$BL$13,0),"")
Helper 2 The good
=IFERROR(MATCH(LARGE(IFS(($BC$13:$BL$13<0.5)*($BC$13:$BL$13>$BC$14:$BL$14)*($BC$13:$BL$13>$BC$15:$BL$15),$BC$14:$BL$14,($BC$14:$BL$14>=$BC$13:$BL$13)*($BC$14:$BL$14>$BC$15:$BL$15),$BC$14:$BL$14,($BC$14:$BL$14=$BC$13:$BL$13=$BC$15:$BL$15),$BC$14:$BL$14,TRUE,""),ROWS($U$2:$U2)),$BC$14:$BL$14,0),"")
Helper 3 the not so good
=IFERROR(MATCH(LARGE(IF(($BC$14:$BL$14=$BC$15:$BL$15)*($BC$14:$BL$14>$BC$13:$BL$13),$BC$14:$BL$14),ROWS($V$2:$V2)),$BC$14:$BL$14,0),"")
Helper 4 I ranked them with small so the worst appear at the bottom of the list
=MATCH(SMALL($BC$15:$BL$15,ROWS($W$2:$W2)),$BC$15:$BL$15,0)
SO the first 3 columns only have a few to zero values
Then I used this formula in my results column
=IFERROR(INDEX($BC$10:$BL$10,,(INDIRECT(ADDRESS(ROW(),20)))),(IFERROR(INDEX($BC$10:$BL$10,,(INDIRECT(ADDRESS((ROW()-(COUNT($T$2:$T$11))),21)))),(IFERROR(INDEX($BC$10:$BL$10,,(INDIRECT(ADDRESS(((ROW())-(COUNT($T$2:$T$11))-(COUNT($U$2:$U$11))),22)))),(INDEX($BC$10:$BL$10,,(INDIRECT(ADDRESS(ROW(),23))))))))))
This returned the values based on the column number in the helpers and ranked the results from best to worst
- Dichotomy66Apr 30, 2019Brass Contributor
TwifooI looked but your results didn't sort the subset results. And I couldnt see a simple way to modify this... The primary end goal is to have the LLL-HHH Values sorted from best to worst based on the criteria. I don't need or want any of the other data from the originating table transposed also. IN your results the one that was ^*% RA ended up down a ways instead of at the top for ex