Selecting latest date in a list with multiple objects

robbied13

New Member
Joined
Apr 18, 2011
Messages
25
Good morning,

The way our planning system is set up, it creates a brand new record for an employee if they move departments. The first record will have an effective end date on the date of the transfer and the second record will have an effective start date on the same day. Normally, if they do not move, the effective start date is just their start date. What's the easiest way to pull the latest effective start date for an employee based on their employee ID?

In the below example, Emp A changed departments, Emp B left the company, and Emp C is still at the company in the same department. The latest effective start date is 1/1/18 for Emp A

[TABLE="width: 500"]
<tbody>[TR]
[TD]Emp ID[/TD]
[TD]Start Date[/TD]
[TD]Term Date[/TD]
[TD]Effective Start Date[/TD]
[TD]Effective End Date[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Emp A
[/TD]
[TD]1/1/16[/TD]
[TD][/TD]
[TD]1/1/16[/TD]
[TD]12/31/17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Emp B[/TD]
[TD]1/1/17[/TD]
[TD]12/1/17[/TD]
[TD]1/1/17[/TD]
[TD]12/1/17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Emp C[/TD]
[TD]6/1/17[/TD]
[TD][/TD]
[TD]6/1/17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Emp A[/TD]
[TD]1/1/16[/TD]
[TD][/TD]
[TD]1/1/18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="width: 811"]
<colgroup><col><col span="2"><col><col><col span="2"><col></colgroup><tbody></tbody>[/TABLE]

Thanks,

Rob
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Try this:

Code:
{=MAX(IF(A2:A5="Emp A",D2:D5))}

Note the formula is an array and requires you to use Ctrl + Shift + Enter and not just Enter. Do not try to enter the braces yourself as it will error.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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