I have two datatables: dt1 and dt2
Dt1 is a file which contains names and deadlines (the names can occur more then once with a different deadline). Some of the names do not contain deadlines yet and I need to define whether they are available or not (the condition for available is (if date of today - deadline most in the future < 25 days).
Dt2 is a file with names (same names as in dt1)
I already have the code for determining if he/she is available.
But if he/she is not available it should go to the next row in dt2 and check the same.
It should do this until if found a name that is available.
How do I put this in a do while function? or any other suggestion?
I cannot share it but I created an example and simplified it a little bit.
Please find the excel below. It needs to loop through the excel and I want to get the first “name” where the current deadline - the date of today (16/10/2018) is less then 10 days. so in this case I would expect as output “Elma”. The number of lines can vary when running the bot at different times, so it should be variable + the dates can vary as well.
Thanks! already very nice. One extra thing. The output is now giving me “Elma” and “Paul” in your example.
I only want to write the first occurence in the output, so in this case “Elma”.
How should I do this?