I found helper rows defining 5 with 10, 5 with 15, 5 with 22, etc. simpler.
In the attached find this for the A B line in P4 and filled across.
Formula:
=IF(LOOKUP(2,1/(P1=$B$2:$K$2),$B7:$K7) > LOOKUP(2,1/(P2=$B$2:$K$2),$B7:$K7),1,-1)
Then for the A B C line in P10 and filled across.
Formula:
=IF(AND(LOOKUP(2,1/(P6=$B$2:$K$2),$B7:$K7) > LOOKUP(2,1/(P7=$B$2:$K$2),$B7:$K7),LOOKUP(2,1/(P7=$B$2:$K$2),$B7:$K7) > LOOKUP(2,1/(P8=$B$2:$K$2),$B7:$K7)),1,IF(AND(LOOKUP(2,1/(P6=$B$2:$K$2),$B7:$K7) < LOOKUP(2,1/(P7=$B$2:$K$2),$B7:$K7),LOOKUP(2,1/(P7=$B$2:$K$2),$B7:$K7) < LOOKUP(2,1/(P8=$B$2:$K$2),$B7:$K7)),-1,0))
Bookmarks