+ Reply to Thread
Results 1 to 3 of 3

Lookup time value based on criteria

  1. #1
    Registered User
    Join Date
    06-07-2018
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    12

    Lookup time value based on criteria

    Hello Excel masters!

    I hope someone can help me out. I'm currently running out of ideas on how to make this work.

    I need to find an approximate time on a given date per specific employee based on their logs. My goal is to lookup for a range of time that falls under another range of time. Unfortunately, the formula that I currently use only works if I add 1 employee's data on file but if there's multiple, that's when I get random lookup values.

    Please see the attached file for more details. Formula is in "Qatch" worksheet under column H.

    Please Login or Register  to view this content.
    I'm open to suggestions such as adding columns to expand the criteria since I'm dealing with 160 employees with 600 to 1000 rows of data for each.

    The sample Excel file only contains 2 employees but it's already inaccurate.

    Any help would be appreciated
    Attached Files Attached Files

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Lookup time value based on criteria

    LOOKUP, when used in this context, relies on the lookup_vector being sorted in Asc order and this isn't the case in your file.

    If, as implied, your file is going to be big then I would still advocate LOOKUP as it will give you massive performance gains BUT you must sort your Raw Data tab by PEIN & Date Treated (or simply Combine_Qatch if this column is a Constant rather than being derived from [PEIN]&[DateTreated])

    Once you've done that, revert to your Qatch tab and review results -- if not as expected please post back and advise expected results... it's hard to discern what the expected results are from your initial post.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Lookup time value based on criteria

    First of all, congratulations on a well-laid-out data set AND in an Excel Table no less!

    I think I have what you want. On the Control Panel sheet, you can define the start and end dates and times in the green shaded cells where indicated.

    On the Raw Interval sheet, I added some helper columns to compute the date-time (date + start time) and the length of the call. I had to convert the length of call into a string because I can't set the cell format where it is in the pivot table. I also have a column called In Range to determine if the start date and time and end date and time for a record is within the times specified on the Control Panel sheet.

    I then made a pivot table on the results. I created some agents to demonstrate the use of slicers to filter the data to look up specific agents.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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. Lookup closest time value based on criteria
    By ryanpog1 in forum Excel General
    Replies: 16
    Last Post: 07-10-2019, 09:15 PM
  2. Replies: 0
    Last Post: 05-02-2016, 07:59 AM
  3. [SOLVED] Lookup based on three criteria
    By IronCladRooster in forum Excel General
    Replies: 2
    Last Post: 10-15-2015, 02:27 PM
  4. [SOLVED] lookup value based on 2 criteria
    By nilelator in forum Excel General
    Replies: 5
    Last Post: 09-29-2015, 04:59 PM
  5. How to lookup value based on Date time closest to criteria
    By ilionel1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-08-2013, 02:01 PM
  6. [SOLVED] Lookup value based on criteria
    By bertrand82 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-07-2012, 06:25 AM

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