1st Sem | 2nd Sem | 3rd Sem | 4th Sem | |
---|---|---|---|---|
MATHS | 10 | 20 | 30 | 15 |
ENGLISH | 20 | 35 | 5 | 15 |
Result
Tried to get the result (second picture). Looked for an answer and only got answers which results the marks but not first column matching the mark. Can anyone please help.
In older Excel:
=INDEX($B$1:$E$1,MATCH(MAX(B2:E2),B2:E2,0))
Or =LOOKUP(MAX(B2:E2),B2:E2,$B$1:$E$1)
In case you need it to deal with ties:
=TEXTJOIN(", ",,REPT($B$1:$E$1,B2:E2=MAX(B2:E2)))
(Not sure it requires being entered with ctrl+shift+enter
)
And replace MAX by MIN for min header.
Using Office 365:
=@SORTBY($B$1:$E$1,B2:E2,-1)
And remove ,-1
for min header.