+ Reply to Thread
Results 1 to 8 of 8

Lookup if Time Between

Hybrid View

  1. #1
    Registered User
    Join Date
    11-02-2020
    Location
    GB, WI
    MS-Off Ver
    365
    Posts
    4

    Lookup if Time Between

    Hi there!

    I'm lost trying to figure out which formula to use in order to get a shift result (1 or 3) after data is entered into an "area" column and a "time" column.
    In my lookup table are the 5 areas & min/max times for shift 1. I have not entered values for a shift 3 as what is not 1 is 3. Please note the "time" column is just numbers for lookup - not formatted as time.

    I can apply the IFs, but am not looking for a huge nested formula to tie in the area. So I think the answer is to look up the area, then generate an IF <> ?


    Any help is appreciated!
    Regards,
    SQ
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365
    Posts
    3,187

    Re: Lookup if Time Between

    Hi,
    please try this in J3 and down:
    =IF(SUM(((Table27[@area]=Table16[area])*(VALUE(Table27[@time])>=VALUE(Table16[min]))*(VALUE(Table27[@time])<=VALUE(Table16[max])))),1,3)

  3. #3
    Registered User
    Join Date
    11-02-2020
    Location
    GB, WI
    MS-Off Ver
    365
    Posts
    4

    Re: Lookup if Time Between

    Hi, Belinda!
    Thank you for the response & interesting formula! However, it doesn't work past the 5th row of data when I tested it (I had same issue with another variation I'd tried), it returns a #VALUE!.

  4. #4
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365
    Posts
    3,187

    Re: Lookup if Time Between

    So post this file to see where your problem is.
    This works in my sheet....
    Attached Files Attached Files
    Last edited by Limor_OP; 11-02-2020 at 06:06 PM. Reason: added formulas to the attachment

  5. #5
    Registered User
    Join Date
    11-02-2020
    Location
    GB, WI
    MS-Off Ver
    365
    Posts
    4

    Re: Lookup if Time Between

    When I opened that file, it looks like my original with no formulas. I've attached my copy with your formula and there are 2 cells that didn't give expected value. Maybe I should start anew?
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365
    Posts
    3,187

    Re: Lookup if Time Between

    Yes, this should work in your file as well. Please find attached
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-02-2020
    Location
    GB, WI
    MS-Off Ver
    365
    Posts
    4

    Re: Lookup if Time Between

    This one works great! Thank you so much!

  8. #8
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365
    Posts
    3,187

    Re: Lookup if Time Between

    You're welcome.

+ 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. Help with VBA time lookup Macro
    By moxman in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-03-2019, 09:35 AM
  2. reduce the time to lookup value
    By nth34 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-03-2015, 10:18 AM
  3. Help with lookup at the same time using a value
    By ngoma in forum Excel General
    Replies: 1
    Last Post: 04-06-2014, 09:27 AM
  4. [SOLVED] Time Lookup
    By seanyc in forum Excel General
    Replies: 2
    Last Post: 06-19-2012, 05:10 PM
  5. Lookup value for certain time
    By novice2430 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-02-2008, 07:00 PM
  6. Lookup execution time
    By Zade in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-26-2007, 01:34 PM
  7. [SOLVED] time lookup
    By armyaviatr in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 10-08-2005, 10:05 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