[Formula Help] Find 'Name' within separate Range and pull the lowest of multiple 'Dates' and also the corresponding 'Contract Number' for that Date

NJ7

New Member
Joined
Jun 30, 2020
Messages
6
Office Version
  1. 365
Platform
  1. Windows
My goal is to fill the yellow-highlighted table in the 'Output Table' tab.

I want to find the Nearest Contract Expiration Date (to TODAY() if possible) based on the name in Column C.

My issue is there are multiple "Color" contracts, each having their own expiration date and possibly contract number.

So if possible, I went to find "John" in the "Data Table" tab, locate the nearest of the 4 "Color" dates, and then also grab the corresponding Contract Number to that date.

Is this possible? I have tried to simplify it the best I can, but unfortunately due to the nature of the data I am afraid this is as simple as it gets.

Thank you in advance!

Output Table:


Nearest Contract Expiration DateContract Number for Nearest Contract Expiration DateName
John
Luke
Bryan
Jake

Data Table:

BlueYellowGreenRed
NameContractExpirationContractExpirationContractExpirationContractExpiration
John
12345
1/1/2025
11234
1/1/2026
11123
1/1/2028
11112
1/1/2027
Luke
23456
2/2/2026
22345
2/2/2028
22234
2/2/2027
22223
2/2/2025
Bryan
34567
3/3/2027
33456
3/3/2026
33345
3/3/2025
33334
3/3/2028
Jake
45678
4/4/2028
44567
4/4/2027
44456
4/4/2026
44445
4/4/2025
 
I'm afraid I don't understand what you are saying and the fact that you have changed the layout of your data doesn't help.
Can you please post some sample data using the XL2BB add-in.
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,214,944
Messages
6,122,391
Members
449,080
Latest member
Armadillos

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