+ Reply to Thread
Results 1 to 5 of 5

several dates ("holidays'" in a column) between 2 dates

  1. #1
    Registered User
    Join Date
    03-18-2014
    Location
    Rochester, NY
    MS-Off Ver
    Excel MAC, 2011
    Posts
    2

    several dates ("holidays'" in a column) between 2 dates

    Hello group!

    please see attached file time_tracking.xlsx (saved/created on Excel for MAC 2011)

    Up to this point I was able to figure pretty much everything out on my own, some 'formulas' might not be that great and few things might not be perfect, but it works for me and does the job...

    Here's my problem where I'll need your help:

    Please see column T, the holidays of 2014
    For each of the lines 6 to 11 (Customer 1 to Customer 6, many more will follow) I do need a formula that figures out if ANY of the dates in column T are between the dates in C6 and F6
    IF that's the case, I'd need a number 1 to show in L6, if that's not the case, I'd need a number 0 to show in L6

    For example, none of the holidays in column T are within the dates of lines 6 to 10, in those lines I'd need the number 0 in L6 to L10
    BUT
    the 2nd holiday in column T (4/18/2014) falls between C11 and F11... Here I would now need the number 1 in L11


    That's basically it...

    If you're interested what the whole thing is for:
    the large green box gives me the average of the days in column M
    the large orange box gives me the average in hours (decimal and then in hrs and mins)

    days are easily calculated using the dates
    but what i can not calculate/use are weekends, "off"-hours, holidays, etc...
    only working-hours from 8am to 5pm with 1 hour lunch are calculated (at least i hope so, haha)

    columns H to L

    H
    figures out if there's a weekend between the dates in column C and column F

    I
    gives me a 1 if IN-time is before 12 noon

    J
    gives me a 1 if OUT-time is after noon

    K
    gives me a 1 if weekend between dates in column C and F and if the OUT-time is after noon

    L
    I'll need your help with this one as I tried to explain above
    L should give me the number 1 if ANY of the dates in column T fall between the IN-date (column C) and the OUT-date (column F)


    THANK YOU ALL SO MUCH FOR YOUR HELP!!!!
    Martin
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,298

    Re: several dates ("holidays'" in a column) between 2 dates

    For your problem, in L6 use the formula

    =IF(SUMPRODUCT((C6<=$T$2:$T$20)*(F6>=$T$2:$T$20))>0,1,0)

    where T2:T20 have the holiday dates. (I did not open your file, so adjust the range as needed.)

    I also assumed C6 is earlier than F6 - they may need to be switched if that is not the case.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    03-18-2014
    Location
    Rochester, NY
    MS-Off Ver
    Excel MAC, 2011
    Posts
    2

    Re: several dates ("holidays'" in a column) between 2 dates

    Quote Originally Posted by Bernie Deitrick View Post
    =IF(SUMPRODUCT((C6<=$T$2:$T$20)*(F6>=$T$2:$T$20))>0,1,0)

    Mr. Deitrick, THANK YOU
    that's amazing...
    do you "just know" those things?
    wow

    thank you again!!

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,298

    Re: several dates ("holidays'" in a column) between 2 dates

    do you "just know" those things?

    I started using Lotus 123 in 1985, so I've had a long time to learn spreadsheet and data logic.

  5. #5
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,298

    Re: several dates ("holidays'" in a column) between 2 dates

    do you "just know" those things?

    I started using Lotus 123 in 1985, so I've had a long time to learn spreadsheet and data logic.

+ 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. sumif based on year value from column with dates in "mm/dd/yyyy" format
    By Willardio in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-27-2013, 04:58 PM
  2. Using "match" with dates - dates entered with vba return error
    By Islwyn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-30-2012, 09:47 AM
  3. [SOLVED] How do I count like dates in a column with format "January-05"?
    By Kentski in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-15-2006, 09:55 PM
  4. Conditional Formatting, Dates, and "Fill Column"
    By cht13er@gmail.com in forum Excel General
    Replies: 2
    Last Post: 11-23-2005, 03:50 PM
  5. Find a "date" in a column of dates in Excel 2000
    By JR Hester in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-02-2005, 06:20 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