formula to extract the records with oldest date and another criteriia

GerryZ

Well-known Member
Joined
Jul 4, 2014
Messages
1,224
Office Version
  1. 365
Platform
  1. Windows
hello Excel gurus
I'm stuck
All I need a formula in F2 to copy across and down that choose
from the first criteria (AAA) the oldest date in (AAA) and than ritrieve the name of the student and the corrisponding date
I Made a formula with INDEX MAX IF but does't work


Book1
ABCDEFG
1criteriostudentdateacriteriostudentoldest data
2aaastudent115/01/2015aaastudent217/01/2018
3aaastudent217/01/2018bbbstudent522/01/2016
4aaastudent316/01/2015cccstudent1112/04/2016
5bbbstudent415/01/2014
6bbbstudent522/01/2016
7bbbstudent618/01/2015
8bbbstudent718/01/2014
9bbbstudent821/01/2014
10cccstudent907/06/2015
11cccstudent1014/07/2015
12cccstudent1112/04/2016
13cccstudent1213/02/2015
14cccstudent1311/03/2015
Sheet5
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Maybe this array formula:

=MAX(IF($A$2:$A$14=E2,IF($B$2:$B$14=F2,$C$2:$C$14)))
 
Upvote 0
That will copy down ok? Put it in G2 and pull down to G4. Is that not working for you?
 
Upvote 0
Or, a touch convoluted maybe, but if you want a single, non-array formula to be placed in F2 and then copied down and across:

=LOOKUP(1,0/FREQUENCY(0,1/(1+($A$2:$A$14=$E2)*$C$2:$C$14)),CHOOSE(COLUMNS($A:A),$B$2:$B$14,$C$2:$C$14))

Regards
 
Upvote 0
I make clear
I need to extract data making one formula
I need in this way
one single formula in F2 to copy across and down


Book1
ABCDEFG
1criteriostudentdateacriteriostudentoldest data
2aaastudent115/01/2015aaa
3aaastudent217/01/2012bbb
4aaastudent316/01/2015ccc
5bbbstudent415/01/2014
6bbbstudent522/01/2016
7bbbstudent618/01/2015
8bbbstudent718/01/2014
9bbbstudent821/01/2014
10cccstudent907/06/2015
11cccstudent1014/07/2015
12cccstudent1112/04/2016
13cccstudent1213/02/2015
14cccstudent1311/03/2015
Sheet5
 
Upvote 0
How about:

=INDEX(B$2:B$14,MATCH(MAX(IF($A$2:$A$14=$E2,$C$2:$C$14)),$C$2:$C$14,0))

Again CSE
 
Upvote 0
Not sure what I was doing with that CHOOSE function! Simply (non-array):

=LOOKUP(1,0/FREQUENCY(0,1/(1+($A$2:$A$14=$E2)*$C$2:$C$14)),B$2:B$14)

will suffice.

Regards
 
Upvote 0
Or, a touch convoluted maybe, but if you want a single, non-array formula to be placed in F2 and then copied down and across:

=LOOKUP(1,0/FREQUENCY(0,1/(1+($A$2:$A$14=$E2)*$C$2:$C$14)),CHOOSE(COLUMNS($A:A),$B$2:$B$14,$C$2:$C$14))

Regards

Hello XOR LX
I think I know You!! :)
Anyway the formula doesn't not work..probably I'm doing some mistakes
if is easier why don' t you make array formula?

Somenthig with INDEX and MAX or SMALL??
 
Upvote 0
if is easier why don' t you make array formula?

Of course - that's a perfectly viable method. In fact, steve the fish's solution does just that. See my previous post - the version there is a bit simpler, and should work fine. It's an alternative to the standard CSE set-up which I happen to like.

Regards
 
Upvote 0

Forum statistics

Threads
1,215,425
Messages
6,124,824
Members
449,190
Latest member
rscraig11

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