Compare two excel data and write data in third

Hi,

I am having 2 excels data and data1, I have to pickup employe code from data excel and compare it with employee code in data 2 excel and if available have to pick employee name from data2 and write in output excel along with date and time (9:30 and 18:30) ,if employee name has P or T written in front of his name on data excel.
Once you see attached excel, it will be clear.
Please see if you can helpdata.xlsx (9.0 KB) data2.xlsx (31.8 KB) Output.xlsx (16.5 KB)