Forum Discussion
Mr_FunGuy
Jul 19, 2022Copper Contributor
Trying to use "If" array to pull data in order from highest stat to lowest
My starting formula for Q2 is: =if (K2=$B2,$B$1,(if(K2=$C2, $C$1,(if(K2=$D2,$D$1,(if(K2=$E2,$E$1,(if(K2=$F2,$F$1,(if(K2=$G2,$G$1,"false")))))))))) This gives me the first value associated with ...
- Jul 19, 2022
In Google Sheets I was able to reproduce it with this formula:
=TRANSPOSE(INDEX(SORT(TRANSPOSE(A1:F2),2,0),,1))
Patrick2788
Jul 19, 2022Silver Contributor
You may consolidate the logic of the formula by using AND:
=IF(AND(L2=$B$2,Q2<>$B$1),$B$1,IF(AND(L2=$C$2,Q2<>$C$1),$C$1,IF(AND(L2=$D$2,Q2<>$D$1),$D$1,IF(AND(L2=$E$2,Q2<>$E$1),$E$1,IF(AND(L2=$F$2,Q2<>$F$1),$B$1,IF(AND(L2=$G$2,Q2<>$G$1),$G$1,"false"))))))
Mr_FunGuy
Jul 19, 2022Copper Contributor
Patrick2788
I've tried this as well already... I'm using google sheets, so perhaps I've gotta find a way around?