Forum Discussion
kemble999
Oct 09, 2019Copper Contributor
comparing cell values to determine which is highest, then returning the name assocaited with it
Okay, so I've exhausted everything I can find and I'm still nowhere on this. The problem is this: Part 1: The formula to look at both A2 and B2 to determine which is highest, then in...
SergeiBaklan
Oct 09, 2019Diamond Contributor
For such sample
for the first case formula could be
=IF(MAX(A2:B2)<1000, "no winner", INDEX($A$1:$B$1,(B2>A2)+1))
for the second one
=IF( MAX(F2:G2)<MAX(AGGREGATE(14,6,1/($E$2:$E$6=$E2)*$G$2:$G$6,1),AGGREGATE(14,6,1/($E$2:$E$6=$E2)*$F$2:$F$6,1))+(MAX(F2:G2)<1000), "no winner", INDEX(F$1:G$1,(AGGREGATE(14,6,1/($E$2:$E$6=$E2)*$G$2:$G$6,1)>AGGREGATE(14,6,1/($E$2:$E$6=$E2)*$F$2:$F$6,1))+1))
- kemble999Oct 09, 2019Copper Contributor
Thank you for looking at this problem for me.
In your solution for part 2, there are two instances of no winners, when there is:
H2 would show yellow as the winner as being higher than blue 1183 vs 1001, and the same for H3
Do let me know if I need to expound on my explanation of the problem, and thanks again
- PascalKTeamOct 09, 2019Iron Contributor
- SergeiBaklanOct 09, 2019Diamond Contributor
When I misunderstood your logic. In second case I checked all pairs marked as 1 (or 2, etc.), found among them highest result and for this pair return the winner. All other "1" pairs are not winners.