+ Reply to Thread
Results 1 to 5 of 5

Advance lookup, multiple conditons, date and time between

  1. #1
    Registered User
    Join Date
    11-29-2020
    Location
    Middlewich
    MS-Off Ver
    365
    Posts
    19

    Advance lookup, multiple conditons, date and time between

    Hi, I need a help with advanced lookup formula.
    What i need to achieve is record IN and OUT time according to swipe times provided by security officers (Im transfering this data into pivot table).
    Which looks like that:
    pivot.jpg
    Data in Pivot table is sorted from newest to oldest. It is not an issue for day shifts.

    The problem that im having is Night shifts (marked as "Green" and "Yellow")
    Screenshot 2022-05-12 113338.jpg

    Formula needs to look for a TIME(from pivot table) where,
    Action = "EXT Main Gate In (13) (In)",
    IF Shift = "Yellow" or "Green" then TIME BETWEEN 17:00 AND 19:00
    And date = date from master sheet.


    Really similiar for OUT Time, the only difference is gonna be date = date from master sheet +1 and time between 05:00 and 07:00.
    Attached Files Attached Files
    Last edited by Komarov; 05-12-2022 at 10:26 AM.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Advance lookup, multiple conditons, date and time between

    I think you uploaded the wrong workbook.....
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    11-29-2020
    Location
    Middlewich
    MS-Off Ver
    365
    Posts
    19

    Re: Advance lookup, multiple conditons, date and time between

    Yes, i did. Sorry!
    Updated.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Advance lookup, multiple conditons, date and time between

    Your sample is not really a sample of your data - show the data table that you have with multiple data points, and the result that you want, with an explanation of why that result is chosen. Why do you choose 17:40 out of all of these values?

    Card Name Date Time Action
    user1 9/19/2021 1:43 EXT Main Gate In (13) (In)
    user1 9/19/2021 4:25 EXT Main Gate In (13) (In)
    user1 9/19/2021 17:40 EXT Main Gate In (13) (In)
    user1 9/19/2021 20:35 EXT Main Gate In (13) (In)
    user1 9/19/2021 20:54 EXT Main Gate In (13) (In)
    user1 9/19/2021 22:07 EXT Main Gate In (13) (In)
    user1 9/20/2021 1:20 EXT Main Gate In (13) (In)
    user1 9/20/2021 4:28 EXT Main Gate In (13) (In)
    user1 9/20/2021 5:59 EXT Main Gate In (13) (In)
    Last edited by Bernie Deitrick; 05-12-2022 at 12:56 PM.

  5. #5
    Registered User
    Join Date
    11-29-2020
    Location
    Middlewich
    MS-Off Ver
    365
    Posts
    19

    Re: Advance lookup, multiple conditons, date and time between

    This data is from the night shift, they are starting at 18:00 and finishing at 06:00 next day.

    user1 9/19/2021 17:40 EXT Main Gate In (13) (In)

    This result is choosen, because thats the gate to the parking lot, i need to record time when users gonna arrive on a site. Ideally they need to clock between 17:00 and 18:00, but they might be late to work as well, that's why i want to record first swipe time between 17:00 and 19:00.
    Same with the clock out time, which is gonna be first swipe time between 05:00 and 07:00. (Some users will be clocking out couple minutes after 6, and some of them usally around 5:40.).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Lookup with 3 conditons (1 is date equal or next date)
    By thilag in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-21-2014, 04:15 AM
  2. Lookup Value With Duplicate and Conditons Problems
    By svatz in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-10-2013, 12:00 PM
  3. Macro to lookup a value and opposite of that value based on two conditons
    By gokzee in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-11-2012, 12:23 AM
  4. Automatically insert date if conditons met
    By jgumbre in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-19-2012, 06:47 PM
  5. [SOLVED] Multiple conditons in a formula
    By ThomasCarter in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-22-2012, 05:08 PM
  6. Auto advance with date/time stamp
    By ADWaters in forum Excel General
    Replies: 2
    Last Post: 09-02-2010, 01:27 PM
  7. Advance filtering with multiple conditons
    By falloutx in forum Excel General
    Replies: 3
    Last Post: 01-21-2006, 03:28 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1