Vlookup with Two Criteria

Omagoodness

New member
Joined
Apr 8, 2015
Messages
5
Reaction score
0
Points
0
Location
NS Canada
Excel Version(s)
2016
The owner of a very small business wants his employees to log their worked hours electronically. (At this time they do not have a web site). He has set up a form on a shared drive that collects the data and store it in a sheet in the following format:
Sheet1.jpg
He also has a sheet containing formulas for pay calculation and needs to transfer the data to the appropriate cells on that sheet. The payroll sheet is set up in the following format:
Sheet2.jpgSheet2.jpg


I am a fairly good excel user but this is beyond me. I have tried INDEX/MATCH formulas, nesting VLOOKUP and IF/VLOOKUP but cannot get one that works. I need to be able to get the IN and OUT time for each employee for the date worked.

This is not the best or most efficient way of managing this process but it's the one my client has for now. Can anyone help?
 
Assuming the first sheet is called Hours, this array formula in the second sheet should do it for you

=IFERROR(INDEX(Hours!$C$1:$D$100,MATCH(1,($A3=Hours!$A$1:$A$100)*(IF(A$2="In",A$1,B$1)=Hours!$B$1:$B$100),0),1+(B$2="Out")),"")
 
Perfect!!!! Thank you soooo much!
How do I mark as resolved? I looked in thread tools but didn't see it.
 
Last edited:
Back
Top