Filter with Emp ID and get recent Date

I have a excel data and the data look like given below


If i give input as Emp ID - 986976, then my output should be 04/01/2020. recent date among the list of dates given for same employee.

Please give some short cut or any idea to achieve this easier

Hi @Deeipauk

You can iterate the employee ID in a for each loop and add the date values into an array and sort that array in descending order, then you can get the first value of that array as the recent date.

1 Like

@Deeipauk If Employee ID is not going to be repeated again, then you can use this workflow, Check this : (7.4 KB)

It will be repeated as shown in the sample sheet

@Deeipauk Why do you want the Output as 04/01/2020 instead of other values, there are other values ass well corressponding to it

Let me detail it out – For a given employee I need to check already the letter is sent out? (emp ID match found or not)
If letter sent out, I want the latest date of letter sent.

@Deeipauk Ok ,We can get the Latest date, but how do we know if the letter is sent or not?

if emp id exist in this sheet, then letter is sent

@Deeipauk Can you Check this :
And make sure you check for all your requirements (7.6 KB)

1 Like

Thanks dude, I will check and let you know

You can use linq query.
assign"Datatable" dt“ColA = '”+ EmpIoyee ID +"’).copytodatatable

That column alone will get filtr then in another assign that column only you will get…

Dt=Dt.DefaultView.ToTable(False,”letter Sent Date”)

1 Like

I can make use of your code. It is working fine
Thanks for your help

1 Like

I didn’t tried your solution since the other one worked :slight_smile:
Thanks for your response

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.