Lookup a value and Index Match Table - If a Date is between 2 dates with criteria : I would like to look up first ID match with second ID, if found then match first date with the given range date within same raw and then add type of leave according to the first date if matched

by using Vlookup / Match index /if

[Comparison data][1]


  [1]: https://i.stack.imgur.com/UPdj9.jpg


please help ^_^