+ Reply to Thread
Results 1 to 10 of 10

start/end dates between/overlap multiple start/end dates

  1. #1
    Registered User
    Join Date
    04-06-2010
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003
    Posts
    16

    start/end dates between/overlap multiple start/end dates

    Hello,

    I've been trying to find a way to do this for days now and pretty much stuck.

    I am trying to assign tasks to people in a spreadsheet using a start date and end date. What I'm trying to do is have these start/end dates check against their time off start and end dates. The problem is people have multiple start/end dates for time off.

    I want to show a value or conditional format that will alert me that I have scheduled a task that overlaps or is between the start/end time off dates. Is this possible?
    Last edited by garricko; 05-04-2010 at 07:23 PM.

  2. #2
    Forum Contributor day92's Avatar
    Join Date
    04-20-2010
    Location
    Los Angeles
    MS-Off Ver
    Excel 360
    Posts
    600

    Re: start/end dates between/overlap multipe start/end dates

    Garricko,

    It might be helpful to upload some dummy data so we can better understand your issue.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: start/end dates between/overlap multipe start/end dates

    At the simplest level then if you have time off date periods in A3:B10 and task periods in E3:F10 then you can select E3:F10 and use this formula in conditional formatting

    =AND(COUNT($E3:$F3)=2,SUM(($A$3:$A$10<=$F3)*($B$3:$B$10>=$E3))>0)

    This will format any task date period that overlaps with any time off date period. Note: formatting only appears once two dates are entered in both column E and F

    This could be expanded to check for specific names if you have task/time off dates for multiple people, see attached
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-06-2010
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: start/end dates between/overlap multipe start/end dates

    Thank you DaddyLongLegs!

    Yes, sorry I did not put an example but DaddyLongLegs got it pretty much what I was looking for. But I am interested in the expanding part with names, can you give me an idea what you mean?

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: start/end dates between/overlap multipe start/end dates

    If I add two names columns, one each for time off and tasks, then formula changes to

    =AND(COUNTA($E3:$G3)=3,SUM(($A$3:$A$10=$E3)*($B$3:$B$10<=$G3)*($C$3:$C$10>=$F3))>0)

    and clearly that means that the task dates for a named individual will only be checked against the time off dates for that person

    see revised attachment
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-06-2010
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: start/end dates between/overlap multipe start/end dates

    This is great!

    Just out of curiosity, if I was to do this via a formula rather than a conditional format would it be much more difficult? I tried pasting the formula and editing the cell references but I noticed that if the timeoff start date and end date is the same, the formula says it is FALSE when it should be TRUE.

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: start/end dates between/overlap multipe start/end dates

    The formula I suggested is an "array formula". That means that if you use it in a cell you need to use CTRL+SHIFT+ENTER so that curly braces appear around the formula (that isn't required within conditional formatting).

    If you want to use in a cell then better to use SUMPRODUCT rather than SUM so that it doesn't need "array entering" - change formula to this:

    =AND(COUNTA($E3:$G3)=3,SUMPRODUCT(($A$3:$A$10=$E3)*($B$3:$B$10<=$G3)*($C$3:$C$10>=$F3))>0)

  8. #8
    Registered User
    Join Date
    04-06-2010
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: start/end dates between/overlap multiple start/end dates

    Thank you very much DaddyLongLegs!!! Works perfectly.

  9. #9
    Registered User
    Join Date
    03-04-2012
    Location
    Penang, Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: start/end dates between/overlap multiple start/end dates

    Hi,

    Can anyone help? Scenario:
    a) Duration is fixed eg 3 months, 1 year
    b) when I key in the latest date, it will automatically change the date 3 months or 1 year ago.
    Eg. Duration 3 years, when I key in 1/3/12 (present date) the date required is 1/12/11 (3 month ago)
    When I change the present date to 1/4/12, the date required is 1/1/12.
    What is the formula?
    Thanking you in anticipation.

  10. #10
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: start/end dates between/overlap multiple start/end dates

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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