+ Reply to Thread
Results 1 to 8 of 8

Check if range of time falls in another range of time

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

    Check if range of time falls in another range of time

    Hi, I'm still pretty new to excel but I am learning for my team. I have checked Google for various formulas but none seems to fit what I am looking for exactly. I'm trying to look for a formula to check if a range of time (inbound/outbound call time) falls in between another time range (ticket time).

    Here is an example of what we are working on:

    (Tickets)
    Start | End
    12:00 | 12:05
    12:22 | 12:30
    12:48 | 12:55
    13:10 | 13:24
    13:38 | 13:44
    14:05 | 14:15
    15:03 | 15:10

    (Calls)
    Start | End | Call Type
    12:03 | 12:10 | INBOUND
    13:05 | 13:23 | OUTBOUND
    14:05 | 14:10 | INBOUND

    What we need to have is:

    Start | End | | Start | End | Call Type
    12:00 | 12:05 | 12:03 | 12:10 | INBOUND
    12:22 | 12:30
    12:48 | 12:55
    13:10 | 13:24 | 13:05 | 13:23 | OUTBOUND
    13:38 | 13:44
    14:05 | 14:15 | 14:05 | 14:10 | INBOUND
    15:03 | 15:10
    Last edited by wafs; 06-11-2018 at 06:56 PM.

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Check if range of time falls in another range of time

    Is it are you looking for?
    Attached Files Attached Files
    Quang PT

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

    Re: Check if range of time falls in another range of time

    That's exactly what I'm looking for! I really appreciate it :D

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Check if range of time falls in another range of time

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

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

    Re: Check if range of time falls in another range of time

    While testing the formula, we found out that it didn't work quite well if the "call time" exceeds the ticket start time and end time.

    =IFERROR(LOOKUP(2,1/(($A$13:$A$15>=$A3)*($A$13:$A$15<$B3)+($B$13:$B$15>=$A3)*($B$13:$B$15<$B3)),A$13:A$15),"")

    Ticket start/end time is absolute while the Call start/end time can vary.

    (Tickets)
    Start | End
    12:00 | 12:05
    12:22 | 12:30
    12:48 | 12:55
    13:10 | 13:24
    13:38 | 13:44
    14:05 | 14:15
    15:03 | 15:10

    (Calls)
    Start | End | Call Type
    12:03 | 12:10 | INBOUND
    13:05 | 13:30 | OUTBOUND
    14:05 | 14:10 | INBOUND

    What we need to have is:

    Start | End | | Start | End | Call Type
    12:00 | 12:05 | 12:03 | 12:10 | INBOUND
    12:22 | 12:30
    12:48 | 12:55
    13:10 | 13:24 | 13:05 | 13:30 | OUTBOUND
    13:38 | 13:44
    14:05 | 14:15 | 14:05 | 14:10 | INBOUND
    15:03 | 15:10

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

    Re: Check if range of time falls in another range of time

    While testing the formula, we found out that it didn't work quite well if the "call time" exceeds the ticket start time and end time.

    =IFERROR(LOOKUP(2,1/(($A$13:$A$15>=$A3)*($A$13:$A$15<$B3)+($B$13:$B$15>=$A3)*($B$13:$B$15<$B3)),A$13:A$15),"")

    Ticket start/end time is absolute while the Call start/end time can vary.

    (Tickets)
    Start | End
    12:00 | 12:05
    12:22 | 12:30
    12:48 | 12:55
    13:10 | 13:24
    13:38 | 13:44
    14:05 | 14:15
    15:03 | 15:10

    (Calls)
    Start | End | Call Type
    12:03 | 12:10 | INBOUND
    13:05 | 13:30 | OUTBOUND
    14:05 | 14:10 | INBOUND

    What we need to have is:

    Start | End | | Start | End | Call Type
    12:00 | 12:05 | 12:03 | 12:10 | INBOUND
    12:22 | 12:30
    12:48 | 12:55
    13:10 | 13:24 | 13:05 | 13:30 | OUTBOUND
    13:38 | 13:44
    14:05 | 14:15 | 14:05 | 14:10 | INBOUND
    15:03 | 15:10

  7. #7
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Check if range of time falls in another range of time

    Please post your samples by attaching a workbook, posting data in the format that you have used, is messy and hard to work with.

    Using the file that bebo attached in post #2

    Enter this formula in C3 and fill down

    =IF(LOOKUP(B3,$A$13:$A$15)=MAX(C$2:C2),"",LOOKUP(B3,$A$13:$A$15))

    This one in D3

    =IF(C3="","",LOOKUP(C3,$A$13:$A$15,$B$13:$B$15))

    And this one in E3

    =IF(D3="","",LOOKUP(D3,$A$13:$A$15,$C$13:$C$15))

    That should work as long as the start times are in chronological order order with no duplicates.

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

    Re: Check if range of time falls in another range of time

    This looks easier than I thought! Thanks a bunch for the help. I was able to apply it and everything now works

+ 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. determine if a certain time stamp falls into a certrain time range
    By tomsemea in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-06-2015, 11:13 AM
  2. Average values if the associated time of occurence falls within a certain time range
    By boarderbrent91 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-02-2014, 01:49 PM
  3. If time falls in a certain range
    By slegendre in forum Excel General
    Replies: 4
    Last Post: 01-19-2013, 09:26 AM
  4. Replies: 3
    Last Post: 05-25-2012, 03:41 PM
  5. [SOLVED] Populate a cell with a value if time falls within a certain range
    By XLVBA in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2012, 12:54 PM
  6. Verifying if a time falls within a range
    By kckid816 in forum Excel General
    Replies: 3
    Last Post: 02-27-2012, 11:07 PM
  7. Replies: 1
    Last Post: 03-19-2007, 07:53 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