Return largest values based on text criteria

klimax

New Member
Joined
Feb 23, 2016
Messages
2
racking my brain trying every various combinations of formula, but using the following general setup have the user provide a "name" and a "skill" and have formula return the three most recent dates and corresponding grades.

Biggest problem i have is that the raw data is in the format that the "skills" are bunched together in a single cell per-instance of date.

in this setup, if i was to provide the name "Karen" and the skill of "jumping" i would like it to return....
1(1/5/2018-84) 2(1/4/2018-85) 3(1/3/2018-62)

the more i look at it, the more it seems that i may need to have another set of columns to split up the text in the 'skill(s)' cell, but i am trying to avoid that.

excel_example_setup.jpg
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Perhaps:

ABCDEFGH
1NameDateGradeSkill(s)
2Bob1/1/201870Running,jumping,sportsNameKaren
3Karen1/1/201876Running,jumping,sportsSkillJumping
4Sally1/1/201879Running,jumping,sports
5Bob1/2/201878Running,jumping,sports
6Karen1/2/201876Running,jumping,sportsMost recent grades based on skill
7Sally1/2/201860Running,sportsn-thDateScore
8Bob1/3/201862Running,jumping,sports11/5/201884
9Karen1/3/201862Running,jumping,sports21/4/201885
10Sally1/3/201867Running,jumping,sports31/3/201862
11Bob1/4/201883Running,jumping
12Karen1/4/201885Running,jumping
13Sally1/4/201862Running,jumping,sports
14Bob1/5/201894Running
15Karen1/5/201884Running,jumping
16Sally1/5/201870Running,Sports

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet4

Array Formulas
CellFormula
G8{=LARGE(IF($A$2:$A$16=$G$2,IF(ISNUMBER(SEARCH($G$3,$D$2:$D$16)),$B$2:$B$16)),ROWS($G$8:$G8))}
H8{=INDEX($C$2:$C$16,SMALL(IF($A$2:$A$16=$G$2,IF($B$2:$B$16=G8,IF(ISNUMBER(SEARCH($G$3,$D$2:$D$16)),ROW($A$2:$A$16)-ROW($A$2)+1))),COUNTIF($G$8:$G8,G8)))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>




The formula in H8 could be a tad simpler, but I allowed for the possibility of multiple scores on the same date.
 
Upvote 0

Forum statistics

Threads
1,215,603
Messages
6,125,788
Members
449,260
Latest member
Mrw1

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