# Cell formula...really interesting

#### ChrisTa

##### New Member
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

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
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.

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.....

Replies
11
Views
335
Replies
11
Views
371
Replies
1
Views
537
Replies
6
Views
945
Replies
0
Views
131

1,221,423
Messages
6,159,822
Members
451,591
Latest member
j0eyjedi

### 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?

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