Cell formula...really interesting

ChrisTa

New Member
Joined
Jul 30, 2007
Messages
6
Hi guys,

I am trying to find a formula to do the following :

I have a list of students with their marks (in each subject) for the 1st and 2nd terms.

Looks like this

A B C
Michel 1st term 2nd term
Math 5 7
French 9 6
English 7 8

What I would like to do the following. Using the max function (=max(B2:C5) in a cell (let's say F5) it would like that in the cell F6 the subject appears automatically, so here it would be 9 French

Thanks a lot for your help

Chris
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Book5
ABCDEFG
1Michel1stterm2ndtem
2Math57
3French96
4English78
59French
Sheet1


Formula in F6: =INDEX(A2:A4,MATCH(F5,B2:B4,0))

EDIT: Oops - I stuck the formula in G5 by mistake, but you get the gist.
 
Upvote 0
You could use this formula

=INDEX(A2:A5,MIN(IF(B2:C5=F5,ROW(C2:C5)-ROW(C2)+1)))

confirmed with CTRL+SHIFT+ENTER

....but if there is a tie this will only return the first subject.....
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top