+ Reply to Thread
Results 1 to 10 of 10

Overlapping Time (Schedules)

  1. #1
    Registered User
    Join Date
    12-02-2016
    Location
    Philippines
    MS-Off Ver
    2010
    Posts
    5

    Overlapping Time (Schedules)

    Hi Guys,

    My first post here, I'm just starting to learn excel and english is not my first tongue so please bare with me. I would say that I have a good knowledge of using logical functions but I can't seem to find a way to determine if there are overlapping schedules in the attached file.

    I need help on applying a formula in column F to check if there are any overlapping schedules. Keep in mind that these are individual schedules.

    Ex.

    duration: 1hr , x=session overlap with another schedule, y=session with no overlap with another schedule

    Schedule A 1:00 - 2:00 X
    Schedule B 1:30 - 2:30 X
    Schedule C 2:00 - 3:00 Y
    Schedule D 3:00 - 4:00 X
    Schedule E 3:10 - 4:10 X

    P.S - there are sessions with the same schedule but with different date = y

    Thanks in advance.
    Attached Files Attached Files
    Last edited by leysanity; 12-02-2016 at 02:04 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Overlapping Time (Schedules)

    Why is one of these shown as a Y?

    Schedule A 1:00 - 2:00 X
    Schedule B 1:30 - 2:30 X
    Schedule C 2:00 - 3:00 Y
    Schedule D 3:00 - 4:00 X
    Schedule E 3:10 - 4:10 X

    When Schedule C partially overlaps with Scheduules B & D. Also, in your attachment, are you referring to individual lines, or to the BLOCKS of identical times (see file)? Also, how are the durations derived? They don't make any sense...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,416

    Re: Overlapping Time (Schedules)

    Your data is inconsistent. For example, on row 17 you have a start time of 9pm and a finish time of 3:30pm, on the same day! Should this be 3:30am on the next day?

    Also, all your durations are shown as 2 hrs 30 mins.

    Pete

  4. #4
    Registered User
    Join Date
    12-02-2016
    Location
    Philippines
    MS-Off Ver
    2010
    Posts
    5

    Re: Overlapping Time (Schedules)

    Amazing, didn't expect a response that fast!

    Hi, Glenn,

    Sorry, schedule C should be tagged as X as well given that it overlaps with schedule B on a 1 hour duration. Although it's okay for schedule C to partially overlap with schedule D given that there's a 1 hour gap. Ex. 1-2, 2-3, 3-4 and 4-5 are perfect schedules.

    Probably due to my poor explanation. Yes, I'm referring to individual lines. In a nut shell, Let's say these are training schedules of different individuals and I only have 1 trainer to cover everything hence I don't want overlapping schedules. The training duration is 2 hours and 30 mins per session.

    Thanks in advance!

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Overlapping Time (Schedules)

    My reply disappearred.

    pretend these are the only values in the set.

    Are these X or Y...

    2 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    3 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    4 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    5 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    6 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    7 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    8 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    9 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    10 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    11 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    12 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    13 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    14 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    15 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00

  6. #6
    Registered User
    Join Date
    12-02-2016
    Location
    Philippines
    MS-Off Ver
    2010
    Posts
    5

    Re: Overlapping Time (Schedules)

    Hi Glenn,

    These are Y given that day are on the same session (same date and same schedule) but if row 16's session overlaps rows 2-15 then rows 2-16 will all become X.





    My reply disappearred.

    pretend these are the only values in the set.

    Are these X or Y...

    2 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    3 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    4 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    5 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    6 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    7 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    8 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    9 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    10 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    11 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    12 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    13 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    14 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    15 05/12/2016 6:30:00 PM 1:00:00 PM 02:30:00
    Last edited by leysanity; 12-02-2016 at 02:06 PM.

  7. #7
    Registered User
    Join Date
    12-02-2016
    Location
    Philippines
    MS-Off Ver
    2010
    Posts
    5

    Re: Overlapping Time (Schedules)

    Sorry Guys, I attached the wrong file. I updated my post with the correct file.
    Last edited by leysanity; 12-02-2016 at 02:05 PM.

  8. #8
    Registered User
    Join Date
    12-02-2016
    Location
    Philippines
    MS-Off Ver
    2010
    Posts
    5

    Re: Overlapping Time (Schedules)

    Quote Originally Posted by Pete_UK View Post
    Your data is inconsistent. For example, on row 17 you have a start time of 9pm and a finish time of 3:30pm, on the same day! Should this be 3:30am on the next day?

    Also, all your durations are shown as 2 hrs 30 mins.

    Pete
    Sorry Pete, I updated the file with the correct one.

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,416

    Re: Overlapping Time (Schedules)

    I think it would help you if you extracted unique ranges, otherwise you are going to have a lot of "Y"s in your overlap column just because you have duplicated ranges for each attendee. To do this, you could have this formula in F2:

    =IF(COUNTIFS(B$2:B2,B2,C$2:C2,C2,D$2:D2,D2)=1,MAX(F$1:F1)+1,"-")

    Copy this down to the bottom of your data, and you will get a series of unique sequential numbers for each unique range encountered (plus a hyphen where the range is duplicated). Copy the headings from B1:D1 into H1:J1, then you can put this formula in H2:

    =IF(ROWS($1:1)>MAX($F:$F),"",INDEX(B:B,MATCH(ROWS($1:1),$F:$F,0)))

    which can be copied into I2:J2. Use the Format Painter icon to copy the format from B2:D2 into those cells (to give you date and time formats), and then copy these 3 formulae down until you start to get blanks. You can see by jumping down to the bottom of the data that the highest number in column F is 38, so you only need to copy these latest formulae down to a few more rows than this (e.g. to row 45) to ensure that you extract all the records. You will now have a list of the unique date and time ranges, and you might want a count of the number of people booked onto each course. Put the heading Count in cell K1, and this formula in K2:

    =IF(H2="","",COUNTIFS(B:B,H2,C:C,I2,D:D,J2))

    and copy this down.

    This is the formula that I'm playing about with at the moment in L2 to check for overlaps:

    =IF((COUNTIFS(H:H,H2,I:I,"<"&I2,J:J,">"&I2)+COUNTIFS(H:H,H2,I:I,"<"&J2,J:J,">"&I2))>1,"X","y")

    but it is not quite right and I think that is because your time ranges butt right up to one another so I may need a few more <= or >=.

    I'll have a coffee and give it a bit more thought.

    Hope this helps.

    Pete

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,416

    Re: Overlapping Time (Schedules)

    Following on from before, put this formula in L2:

    =IF(H2="","",IF((COUNTIF(H:H,H2)-COUNTIFS(H:H,H2,J:J,"<="&I2)-COUNTIFS(H:H,H2,I:I,">="&J2))=1,"X","y"))

    then copy down.

    I think that you should also put this formula in E2:

    =D2-C2

    and copy down, and examine the values. some show a duration of 2 hours instead of 2:30, and that is messing up some of the calculations for the overlap in column L.

    Hope this helps.

    Pete

+ 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] Overlapping time within one column
    By heneli627 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-07-2015, 05:47 AM
  2. Sum overlapping start end time intervals
    By Jack-of-Trades in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 10-15-2014, 12:56 PM
  3. Calcute overlapping between two time and date
    By naveen4pundir in forum Excel General
    Replies: 2
    Last Post: 04-11-2012, 07:09 AM
  4. Counting Overlapping Time & Non-Overlapping Time
    By I_need_help1 in forum Excel General
    Replies: 4
    Last Post: 02-08-2011, 02:36 PM
  5. Overlapping Time Formula
    By misterzr in forum Excel General
    Replies: 4
    Last Post: 01-21-2011, 05:55 PM
  6. Overlapping or Duplicate Date &amp;amp; Time
    By Mike in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-06-2005, 05:05 PM
  7. [SOLVED] Overlapping or Duplicate Date & Time
    By Mike in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-17-2005, 06:05 PM

Tags for this Thread

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