# Return Value from Lookup with Multiple Criteria, one being the largest date.

#### pLethora

##### New Member

I am trying to return the value in the "Due Date" column while using the criteria of Name and then only return the most recent data of the "Date" Column.
Example: Looking up "Lee" in Name Column and the latest data for "Lee" being 02/04/2022 in the "Date" Column which would return the "Due Date" 13/06/2022.
Returning Blank value's is perfectly fine. This is due to a need to keep pasting in data which may have duplicates as well as updated data in the "Due Date" Column which must only return the latest date results.

Could not find anything that would solve my issue.

 Date Name Due Date 01/04/2022 Lee 01/04/2022 John 01/04/2022 Adam 02/04/2022 John 02/04/2022 Lee 13/06/2022 02/04/2022 Adam 17/06/2022

### Excel Facts

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

#### arthurbr

##### Well-known Member
Perhaps
Excel Formula:
``=MAXIFS(C2:C7,A2:A7,MAXIFS(A2:A7,B2:B7,"lee"))``

#### pLethora

##### New Member
Perhaps
Excel Formula:
``=MAXIFS(C2:C7,A2:A7,MAXIFS(A2:A7,B2:B7,"lee"))``
Thanks, that didnt quite work the way i needed it to but it kicked started my brain to use:
=MAXIFS(C:C,A:A,MAXIFS(A:A,B:B,G2),B:B,G2) which did what i needed. Thank you.

#### pLethora

##### New Member
Thanks, that didnt quite work the way i needed it to but it kicked started my brain to use:
=MAXIFS(C:C,A:A,MAXIFS(A:A,B:B,G2),B:B,G2) which did what i needed. Thank you.
G2 being the Name.

Replies
6
Views
270
Replies
3
Views
109
Replies
8
Views
113
Replies
1
Views
112
Replies
4
Views
241

1,187,026
Messages
5,961,170
Members
438,521
Latest member
Ailana

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

### Which adblocker are you using?

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

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