+ Reply to Thread
Results 1 to 7 of 7

Finding overlapping time instances

  1. #1
    Registered User
    Join Date
    04-16-2018
    Location
    LIVERPOOL, UK
    MS-Off Ver
    2010
    Posts
    21

    Finding overlapping time instances

    Hi

    I am trying to work out how to calculate the number of overlapping instances based on ranges of time.
    Basically I have a number of desks that connect to jobs and then disconnect. What I am trying to do is work out the capacity load on the desks- to see how many desks are connected to different jobs at the same time.
    I have tried one possible solution in row F but this just seems to return a true vale all the time.
    Some desks do not connect to a job at all- and sometimes the data is missing from column b or c- I may have to filter these out.

    Any suggestions are gratefully received

    regards
    Attached Files Attached Files
    Last edited by shauncrom; 05-28-2020 at 11:45 AM.

  2. #2
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Finding overlapping time instances

    Hi -

    I think the problem is you just forgot to have your SUMPRODUCT check that the Connected Desk number is included in your comparison. I have added that to the beginning of the SUMPRODUCT as follows:

    =IF(B2=0,"NO",SUMPRODUCT((A2=$A$2:$A$7511)*(B2<=$C$2:$C$7511)*(C2>=$B$2:$B$7511))>1)

    Copy and paste this into F2 and then copy down.

    It appears to work. I checked Row 16 that does appear to have an overlap.

    Hope this helps.
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

  3. #3
    Registered User
    Join Date
    04-16-2018
    Location
    LIVERPOOL, UK
    MS-Off Ver
    2010
    Posts
    21

    Re: Finding overlapping time instances

    LogiJmor- Thanks for the advice
    Just one query This seems to show true for only overlapping instances of the value of column A

    So I adjusted the first part of the arguement to look at the day instead as I want to see any overlapping time regardless of the desk_ probably didnt make this clear.
    So the entire list will have all days of the week- just wondering why this doesn't work

    I have attached the file with two highlighted rows that should show false

    Is it just a column sequence issue?

    Many thanks for your help so far
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Finding overlapping time instances

    Hi -

    I was looking at your formula, and the problem is it counts some of your blank cell entries as matches. So, I just added a component in your SUMPRODUCT to verify it's only comparing rows that actually have data in them. The formula looks like:

    =IF(B2=0,"NO",SUMPRODUCT((D2=$D$2:$D$212)*(B2<=$C$2:$C$212)*(C2>=$B$2:$B$212)*($B$2:$B$212>0))>1)

    If you get rid of the ">1" at the end of the formula, you can see how many times you have overlaps of that particular entry. 1 means no overlap. 2 means 1 overlap. 3 means 2, etc. That's not what you asked for, but that's how I tracked down the problem. So, you can copy and paste the above formula into cell F2 and copy down and you should get the correct result.

    Hope this gets it for you.

  5. #5
    Registered User
    Join Date
    04-16-2018
    Location
    LIVERPOOL, UK
    MS-Off Ver
    2010
    Posts
    21

    Re: Finding overlapping time instances

    Hi

    Thanks- apologies for not stating clearly in the first place- I will give it ago.

    Many thanks for taking the time to look at this.

    Best regards

    Shaun

  6. #6
    Registered User
    Join Date
    04-16-2018
    Location
    LIVERPOOL, UK
    MS-Off Ver
    2010
    Posts
    21

    Re: Finding overlapping time instances

    LoginJmor

    Just to let you know- that did the trick

    Again- many thanks

    Shaun

  7. #7
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Finding overlapping time instances

    Great! No problem. Don't forget to mark your post SOLVED per the instructions at the bottom of my very first post on this thread.

+ 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] Finding overlapping date periods for specific variables
    By pickaside in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-12-2019, 10:00 AM
  2. [SOLVED] finding overlapping times on the same date
    By vcorrea83 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-11-2015, 02:26 AM
  3. Finding overlapping mm:ss within a date
    By sdaniel75 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-10-2014, 07:00 PM
  4. [SOLVED] Finding Overlapping Date Entries with matching IDs
    By Zabaran in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-07-2013, 06:30 AM
  5. Macro for finding Overlapping duration of all the machines in service at a time
    By welsel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2012, 06:12 AM
  6. Counting Overlapping Time & Non-Overlapping Time
    By I_need_help1 in forum Excel General
    Replies: 4
    Last Post: 02-08-2011, 02:36 PM
  7. [SOLVED] Finding Overlapping Data
    By comparini3000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2006, 03:45 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