+ Reply to Thread
Results 1 to 9 of 9

Excel 2007 : Working Hrs, Days, Weekends, Holidays calculator

  1. #1
    Registered User
    Join Date
    09-01-2010
    Location
    Kent: England
    MS-Off Ver
    Excel 2007
    Posts
    7

    Smile Working Hrs, Days, Weekends, Holidays calculator

    Hi, I have trawled and tried various answers, but unfortunately I have not managed to find one that solves my problem ....

    I am trying to work out the time lapsesd where I have Col A as a start dd/mm/yy hh:mm:sec, Col B as end dd/mm/yyyy hh:mm:sec.... sounds simple untill I then want it to ignore non-working hours, weekends and holidays.

    Where working Hours are 09:00 to 17:00 Monday to Friday excluding Statutary holidays.

    Example:Start (friday) 30/08/2010 15:30 Ends (wednesday) 01/09/2010 11:45 ---- (where monday 31st is a Holiday) Result = 12hrs 15 mins

    Any help would be greatly appreciated!
    Bazzzer

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Working Hrs, Days, Weekends, Holidays calculator

    Hi,

    I think you will find your answer here
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Working Hrs, Days, Weekends, Holidays calculator

    Your example is a little awry I think given 30th Aug is a Monday and Bank Holiday so result should be 10:45 rather than 12:15, no ?

    If we assume you meant 27th rather than 30th and 30th (rather than 31st) as Bank Holiday then:

    Please Login or Register  to view this content.
    where

    B2 is start datetime
    C2 is end datetime
    holidays is a named range containing public holiday dates (eg Mon 30th Aug)
    (note you could store working start/end times in cells and reference accordingly if preferred)
    The above formula is c/o of our resident date guru daddylonglegs

    edit: I should add that the above is an extended version which should cater for possibility of either/and/or start & end points occurring outside of working window
    Last edited by DonkeyOte; 09-01-2010 at 08:00 AM.

  4. #4
    Registered User
    Join Date
    09-01-2010
    Location
    Kent: England
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Working Hrs, Days, Weekends, Holidays calculator

    Thanks yes I was wrong with the dates! however I cannot get the named reference to work, I have created a colmun with the 8 holiday dates in a dd/mm/yyyy format, highlighted them then defined name holidays ok'd it then the result is #value!
    Again sorry to be a simpleton....
    Bazzzer

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Working Hrs, Days, Weekends, Holidays calculator

    It's not clear which approach you opted for - perhaps you could post a sample file ?

  6. #6
    Registered User
    Join Date
    09-01-2010
    Location
    Kent: England
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Working Hrs, Days, Weekends, Holidays calculator

    Sorry, I coppied and pasted your formula and used the test dates of 27th and 1st to test it prior to building it into a working sheet, so I then added the named reference as described...
    Hope that clarifies
    Bazzzer

  7. #7
    Registered User
    Join Date
    09-01-2010
    Location
    Kent: England
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Working Hrs, Days, Weekends, Holidays calculator

    Have attached test file (I think!)
    Attached Files Attached Files

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Working Hrs, Days, Weekends, Holidays calculator

    31st June is not a valid date.

    (remember to apply the Custom Format of [hh]:mm:ss to the result cell)

  9. #9
    Registered User
    Join Date
    09-01-2010
    Location
    Kent: England
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Working Hrs, Days, Weekends, Holidays calculator

    What another pair of eyes dose!!!!!

    Many many thanks
    Bazzzer

+ 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