+ Reply to Thread
Results 1 to 3 of 3

Dates, Bank Holidays and a Working Week

  1. #1
    Registered User
    Join Date
    06-22-2009
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    68

    Dates, Bank Holidays and a Working Week

    Here's an interesting little problem for you. Attached is an example of what I'm trying to achieve.

    The cells in purple at the top of the sheet contain the working hours of a member of staff (row 1 contains numerical values for each day, i.e. 2=Monday, 3=Tuesday in white etc). The cells in green on the left contain bank holidays for this year. The yellow cells contain dates that will be changed. In the blue cell I have a formula. The red cell is an example of the kind of answer I would require.

    Essentially, what I'm doing is counting how many bank holidays fall between the dates entered in the yellow cells, and that figure is entered into the blue cell. In the example, the number of bank holidays between the 2 dates is 2. Changing the dates will adjust the answer.

    What I would like is a formula that will take the two dates in yellow, scan the list of bank holidays, match the days on which they fall against the purple cells at the top, and add the hours worked on those days together.

    So, in the example, the bank holidays fall on a monday and tuesday, therefore the answer (in the red cell) would be 11 as 5hrs are worked on Monday and 6hrs are worked on a tuesday.

    I'm usually really good with formulas, but this one has me beaten.

    Hope that makes some sense.
    Attached Files Attached Files
    Last edited by jennyaccord; 07-12-2012 at 04:43 AM.

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Dates, Bank Holidays and a Working Week

    Hello
    See my attached reply. One way uses an helper column with SUMPRODUCT, the other is an ARRAY formula without a helper column. Whichever is most efficient for your needs. I can't think of another way at the moment.

    However, I get your example to = 12, as the 06/04/12 was a Friday (Good Friday) Bank Holiday in the UK, not a Monday and Tuesday as you stated.

    Hope this helps.
    DBY
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-22-2009
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    68

    Re: Dates, Bank Holidays and a Working Week

    DBY that's perfect, thanks.

    And, you're right, it was a Friday and Monday. My previous entries were a Monday and Tuesday, I altered them before I attached the spreadsheet and forgot.

    Thanks again.

+ 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