Your formula is only matching the employee ID, and is therefore returning the first entry on the salary data sheet that matches. You need to use an INDEX MATCH formula that references the employee ID AND the date. I will create one for you in a moment.