+ Reply to Thread
Results 1 to 5 of 5

Extracting Days included within date range

  1. #1
    Registered User
    Join Date
    06-08-2011
    Location
    Falls Church, VA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Extracting Days included within date range

    I have a set of tasks that occur at different times throughout the year. The tasks all have a set start and end date, and I have to run reports at any given time. For example in the month of July, I have to report on the tasks that occurred in July; said tasks may have a start date in April and run through November, but I have to report on the portion of the task that occurred in July.

    I am struggling to come up with a valid formula that gives me the number of days that a task occurred in a month (this drives my reports), particularly when the task may not start/end in the month I am reporting on. I have attached a sample data set - I would need to return the number of days that the task occurs in the reporting period in column "I" which I have highlighted. I can't seem to reconcile the start/end dates of tasks and how they fit into my reporting period in columns A-C. Any help would be greatly appreciated!!
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Extracting Days included within date range

    I'm not sure if my logic is correct here but maybe something along the lines of this:

    =MIN(B$3,G3)-MAX(A$3,F3)

  3. #3
    Registered User
    Join Date
    06-08-2011
    Location
    Falls Church, VA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Extracting Days included within date range

    That does part of it, but when a task doesn't start in that date range or has already ended prior to the reporting period beginning, it returns negative numbers.

  4. #4
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Extracting Days included within date range

    Improving upon @63falcondude 's solution-
    Please Login or Register  to view this content.
    This should deal with negatives.
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  5. #5
    Registered User
    Join Date
    06-08-2011
    Location
    Falls Church, VA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Extracting Days included within date range

    Quote Originally Posted by sourabhg98 View Post
    Improving upon @63falcondude 's solution-
    Please Login or Register  to view this content.
    This should deal with negatives.
    That did it - thank you!

+ 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 needed with Gantt project excel sheet with half days included
    By Tikobear in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-18-2017, 12:22 PM
  2. Replies: 2
    Last Post: 09-30-2015, 05:56 PM
  3. Replies: 1
    Last Post: 05-26-2014, 03:46 AM
  4. Search date range +/- 7 days and return date that falls within range
    By tlafferty in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-13-2013, 03:26 PM
  5. [SOLVED] Adding Time with days included in format
    By jayres14 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-27-2012, 08:05 AM
  6. [SOLVED] Calculate how many days in one date range fall into a second date range
    By globalpontoon in forum Excel General
    Replies: 2
    Last Post: 05-08-2012, 03:02 PM
  7. Replies: 4
    Last Post: 03-18-2011, 07:02 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