Formula that return Name according to Max Grade and Age

Israelinas

New Member
Joined
Dec 25, 2016
Messages
25
Hi all,

I need to create a formula that will return the Name and the Favorite Color of a person according to the following:
1) Age = 17
2) Highest grade.


NameAgeGradeFavorite Color
John1799Blue
Stefan2699Red
Jake1778Pink
Donna2898Green
Sam3685Blue
Victoria1588Yellow
Brenda2289Orange

<tbody>
</tbody>


Many thanks,
Israelinas
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Use the following array formulas

Excel Workbook
ABCDEFGH
1NameAgeGradeFavorite ColorAgeNameFavorite Color
2John1799Blue15VictoriaYellow
3Stefan2699Red
4Jake1578Pink
5Donna2698Green
6Sam1785Blue
7Victoria1588Yellow
8Brenda2689Orange
April


Array formulas
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself
 
Upvote 0
Try

If there is a tie for highest grade then this will return the first match


Book1
ABCD
1NameAgeGradeFavorite Color
2John1799Blue
3Stefan2699Red
4Jake1778Pink
5Donna2898Green
6Sam3685Blue
7Victoria1588Yellow
8Brenda2289Orange
9
10
11age17
12
13namefavorite color
14JohnBlue
Sheet2
Cell Formulas
RangeFormula
A14{=INDEX(A2:A8,SMALL(IF(B2:B8=B11,IF(C2:C8=MAXIFS(C2:C8,B2:B8,B11),ROW(B2:B8)-ROW(B2)+1)),1))}
B14{=INDEX(D2:D8,SMALL(IF(B2:B8=B11,IF(C2:C8=MAXIFS(C2:C8,B2:B8,B11),ROW(B2:B8)-ROW(B2)+1)),1))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,544
Messages
6,120,126
Members
448,947
Latest member
test111

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