Results 1 to 4 of 4

Thread: Vlookup with Two Criteria

  1. #1
    Seeker Omagoodness's Avatar
    Join Date
    Apr 2015
    Location
    NS Canada
    Posts
    5
    Articles
    0
    Excel Version
    2016

    Vlookup with Two Criteria



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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:
    Click image for larger version. 

Name:	Sheet1.jpg 
Views:	33 
Size:	36.3 KB 
ID:	10099
    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:
    Click image for larger version. 

Name:	Sheet2.jpg 
Views:	29 
Size:	42.8 KB 
ID:	10100Click image for larger version. 

Name:	Sheet2.jpg 
Views:	29 
Size:	42.8 KB 
ID:	10101


    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?
    The excitement of learning separates youth from old age. As long as you're learning you're not old. (~ Rosalyn S. Yalow ~ )

  2. #2
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,821
    Articles
    0
    Excel Version
    O365
    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")),"")

  3. #3
    Seeker Omagoodness's Avatar
    Join Date
    Apr 2015
    Location
    NS Canada
    Posts
    5
    Articles
    0
    Excel Version
    2016
    Perfect!!!! Thank you soooo much!
    How do I mark as resolved? I looked in thread tools but didn't see it.
    Last edited by Omagoodness; 2020-10-17 at 05:01 PM.
    The excitement of learning separates youth from old age. As long as you're learning you're not old. (~ Rosalyn S. Yalow ~ )

  4. #4
    Administrator AliGW's Avatar
    Join Date
    Nov 2015
    Location
    Ipswich, Suffolk, England
    Posts
    1,472
    Articles
    0
    Excel Version
    Office 365 Subscription
    The SOLVED tag is not enabled on this forum, sorry.
    Ali
    Enthusiastic self-taught user of MS Excel!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •