+ Reply to Thread
Results 1 to 5 of 5

Count if date is between two other dates (for entire columns of dates) - DIFFICULT

  1. #1
    Registered User
    Join Date
    10-14-2011
    Location
    Papenburg, Germany
    MS-Off Ver
    Excel 2007
    Posts
    12

    Unhappy Count if date is between two other dates (for entire columns of dates) - DIFFICULT

    I need a graph which shows the number of delayed tasks over time based on a set of target and actual dates of completion.

    Basically what I need to do is get a list of dates and the number of all tasks which were overdue on the respective date. The basis for this data is a table which lists all tasks with a column containing the respective targe date and another column containing the actual end date for each task.

    Here's a simplified example:
    Task ID Target Date Actual End Date
    #1 01/01/2012 01/02/2012
    #2 01/02/2012 01/02/2012
    #3 01/03/2012 01/06/2012
    #4 01/04/2012 01/05/2012

    Date No. of Tasks overdue Task IDs of overdue Tasks
    01/01/2012 0 -
    01/02/2012 1 #1
    01/03/2012 0 -
    01/04/2012 1 #3
    01/05/2012 2 #3,#4
    01/06/2012 1 #3
    The third column is not needed, I just added it to illustrate which columns were counted.

    It is important that the solution DOES NOT involve a huge amount of cells filled with similar formulas (which would make the file large and calculations slow) or any VBA macros.

    Ideally it should be a formula that counts how many times a given value is both larger than the left and smaller than the right cell value of each row of two neighbouring columns.

    I would really appreciate any help on this as its starting to give me serious headaches

    Deuces

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Count if date is between two other dates (for entire columns of dates) - DIFFICUL

    Hi Deuces,

    I am not clear with your second table which appears to be the answerset you are looking for.
    Completion for Task ID#1 was targeted at 01/01/2012 but completed at 01/02/2012.. hence on 01/01/2012.. this is one task over due and your table differs here.
    Please correct me if I am not getting it correctly. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    10-14-2011
    Location
    Papenburg, Germany
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Count if date is between two other dates (for entire columns of dates) - DIFFICUL

    Quote Originally Posted by dilipandey View Post
    Completion for Task ID#1 was targeted at 01/01/2012 but completed at 01/02/2012.. hence on 01/01/2012.. this is one task over due and your table differs here.
    That depends on your perspective. As I see it, task #1 was not (yet) overdue on 01/01/2012 (since that's the due date). It doesn't really matter though - I could easily adjust this by replacing > with >= in the formula (once I have a formula to work with )

    Thanks for your help, please let me know if this needs further clarification.

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Count if date is between two other dates (for entire columns of dates) - DIFFICUL

    Hi Deuces,

    Go the logic now... the part which I missed was "Over" in overdue....
    I'll look into it and let you know. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Count if date is between two other dates (for entire columns of dates) - DIFFICUL

    Hi Deuces,

    Below is the solution basis your data arrangement:-

    Task ID Target Date Actual End Date Days Day#1 Day#2 Day#3 Day#4 Day#5
    #1 01/01/2012 02/01/2012 1 02/01/2012
    #2 02/01/2012 02/01/2012
    #3 03/01/2012 06/01/2012 3 04/01/2012 06/01/2012
    #4 04/01/2012 05/01/2012 1 05/01/2012

    Use following formula in column "Days" and drag down:-

    Please Login or Register  to view this content.

    Use following formula in column Day#1 and drag right and down:-

    Please Login or Register  to view this content.

    Now to get number of tasks over due, arrange Date and Tasks as below table:-


    Date Tasks
    01/01/2012 0

    Enter dates like 01/01/2012, 01/02/2012... under date column and use following formula under Tasks column :-

    Please Login or Register  to view this content.
    Where I2:R5 would be a range as shown above in first table (e.g., Day#1, Day#2 etc) and T2 is the date which you have just entered.
    Basically, here you are just using countif function to determin how many dates are appearing in the Day#1, Day#2 .... range.

    Feel free to get back in case of any queries.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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