formula to match a date in one column with a date in another

mojo707

New Member
Joined
Jun 7, 2015
Messages
21
I'm trying to find a way (I've looked at Index, match, choose, find, search, substitute and am investigating solver) to match from a list of possible project end dates (demobilization dates) the date closest to each employees contract expiry date. The difficulty is that there will be a finite number of demobilization dates and once one is committed (i.e. matched to an employees contract expiry date, it will be unavailable for further matching). The sample worksheet below shows the desired output from the formula that I am seeking for Column E. In the sample you will see that for the Welder, the Desired Demob Date remains unchanged since a Welder cannot be swapped out for an Electrician whereas the Desired Demob Date for Electricians can change and an Electrician can be moved from one team to another.
ABCDE
Employee ID

<tbody>
</tbody>
Worker
Type

<tbody>
</tbody>
Contract
Expiry Date

<tbody>
</tbody>
Current
Demob Date

<tbody>
</tbody>
Desired
Demob Date

<tbody>
</tbody>
1
Electrician
08/31/19

<tbody>
</tbody>
05/31/20

<tbody>
</tbody>
08/31/19

<tbody>
</tbody>
2Electrician
07/31/19

<tbody>
</tbody>
08/31/19

<tbody>
</tbody>
07/31/19

<tbody>
</tbody>
3Electrician
06/30/19

<tbody>
</tbody>
07/31/19

<tbody>
</tbody>
05/31/20

<tbody>
</tbody>
4Welder
05/31/20

<tbody>
</tbody>
06/30/20

<tbody>
</tbody>
06/30/20

<tbody>
</tbody>

<tbody>
</tbody>
 
I created a macro, but could only test it with just one type of worker (electrician) and the small sample above.
Could you put a larger sample file for testing purposes on a file sharing site? And put in the forum a link to the file.

M.
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
I created a macro, but could only test it with just one type of worker (electrician) and the small sample above.
Could you put a larger sample file for testing purposes on a file sharing site? And put in the forum a link to the file.

M.

Yes, I'll put it on my drop box site and post the link tomorrow.
 
Upvote 0

Forum statistics

Threads
1,215,588
Messages
6,125,691
Members
449,250
Latest member
azur3

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