Identify latest record based on criteria

JoshLyman

New Member
Joined
Jan 11, 2023
Messages
35
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I have a dataset where sometimes a Regno will have multiple entries (highlighted in red below). I need to be able to identify whether the most recent entry for a given Regno (as determined by the most recent LEARNSTARTDATE) reflects a COMPSTATUS of 6.

For instance
A671172 would not meet this criteria, because the most recent entry has a COMPSTATUS of 3
B312726 would not meet this criteria, because the most recent entry has a COMPSTATUS of 1
B930532 would meet this criteria, because the most recent entry has a COMPSTATUS of 6

2223-LearningDelivery (2).csv
ABCDE
1RegnoLEARNSTARTDATELEARNPLANENDDATECOMPSTATUSLATEST
2A56788313/10/202131/07/20231
3A67117222/01/202030/09/20216
4A67117223/06/202231/01/20233
5B01835330/09/201930/09/20221
6B11915807/10/202030/04/20231
7B21697813/10/202131/07/20231
8B21843305/10/202005/10/20231
9B21901204/10/202104/10/20241
10B31272612/10/202231/07/20246
11B31272627/02/202331/07/20241
12B41835307/02/202207/02/20251
13B41975403/10/202203/10/20251
14B42612313/10/202131/07/20231
15B83144910/10/201831/07/20216
16B83144913/10/202031/07/20216
17B83144913/10/202131/12/20221
18B83153009/10/201831/07/20216
19B83153030/09/201929/04/20226
20B83153001/03/202131/07/20231
21B83183010/10/201831/07/20216
22B83183013/10/202031/07/20216
23B83183013/10/202131/12/20222
24B83207010/10/201831/07/20216
25B83207028/06/202131/07/20222
26B83368127/02/201930/11/20216
27B83368101/09/202210/03/20231
28B83374427/02/201930/11/20212
29B93019309/10/201929/04/20222
30B93045409/10/201929/04/20222
31B93053216/10/201929/04/20226
32B93053202/08/202129/04/20236
2223-LearningDelivery (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A:ACell ValueduplicatestextNO


Hope this makes sense!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
How about
Fluff.xlsm
ABCDE
1RegnoLEARNSTARTDATELEARNPLANENDDATECOMPSTATUSLATEST
2A56788313/10/202131/07/20231FALSE
3A67117222/01/202030/09/20216FALSE
4A67117223/06/202231/01/20233FALSE
5B01835330/09/201930/09/20221FALSE
6B11915807/10/202030/04/20231FALSE
7B21697813/10/202131/07/20231FALSE
8B21843305/10/202005/10/20231FALSE
9B21901204/10/202104/10/20241FALSE
10B31272612/10/202231/07/20246FALSE
11B31272627/02/202331/07/20241FALSE
12B41835307/02/202207/02/20251FALSE
13B41975403/10/202203/10/20251FALSE
14B42612313/10/202131/07/20231FALSE
15B83144910/10/201831/07/20216FALSE
16B83144913/10/202031/07/20216FALSE
17B83144913/10/202131/12/20221FALSE
18B83153009/10/201831/07/20216FALSE
19B83153030/09/201929/04/20226FALSE
20B83153001/03/202131/07/20231FALSE
21B83183010/10/201831/07/20216FALSE
22B83183013/10/202031/07/20216FALSE
23B83183013/10/202131/12/20222FALSE
24B83207010/10/201831/07/20216FALSE
25B83207028/06/202131/07/20222FALSE
26B83368127/02/201930/11/20216FALSE
27B83368101/09/202210/03/20231FALSE
28B83374427/02/201930/11/20212FALSE
29B93019309/10/201929/04/20222FALSE
30B93045409/10/201929/04/20222FALSE
31B93053216/10/201929/04/20226TRUE
32B93053202/08/202129/04/20236TRUE
Master
Cell Formulas
RangeFormula
E2:E32E2=INDEX(SORT(FILTER($A$2:$D$100,$A$2:$A$100=A2),2,-1),1,4)=6
 
Upvote 1
Solution
Hi @JoshLyman.
Thanks for posting on the forum.


I show another option for versions prior to 365:

Dante Amor
ABCDE
1RegnoLEARNSTARTDATELEARNPLANENDDATECOMPSTATUSLATEST
2A56788313/10/202131/07/20231Not
3A67117222/01/202030/09/20216Not
4A67117223/06/202231/01/20233Not
5B01835330/09/201930/09/20221Not
6B11915807/10/202030/04/20231Not
7B21697813/10/202131/07/20231Not
8B21843305/10/202005/10/20231Not
9B21901204/10/202104/10/20241Not
10B31272612/10/202231/07/20246Not
11B31272627/02/202331/07/20241Not
12B41835307/02/202207/02/20251Not
13B41975403/10/202203/10/20251Not
14B42612313/10/202131/07/20231Not
15B83144910/10/201831/07/20216Not
16B83144913/10/202031/07/20216Not
17B83144913/10/202131/12/20221Not
18B83153009/10/201831/07/20216Not
19B83153030/09/201929/04/20226Not
20B83153001/03/202131/07/20231Not
21B83183010/10/201831/07/20216Not
22B83183013/10/202031/07/20216Not
23B83183013/10/202131/12/20222Not
24B83207010/10/201831/07/20216Not
25B83207028/06/202131/07/20222Not
26B83368127/02/201930/11/20216Not
27B83368101/09/202210/03/20231Not
28B83374427/02/201930/11/20212Not
29B93019309/10/201929/04/20222Not
30B93045409/10/201929/04/20222Not
31B93053216/10/201929/04/20226Not
32B93053202/08/202129/04/20236Meet
Hoja1
Cell Formulas
RangeFormula
E2:E32E2=IF(AND(B2=LOOKUP(2,1/(($A$2:$A$32=A2)),$B$2:$B$32),D2=6),"Meet","Not")




Respectfully
Dante Amor
--------------
 
Upvote 1
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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