+ Reply to Thread
Results 1 to 13 of 13

Number of Working days between 2 dates

  1. #1
    Registered User
    Join Date
    10-02-2007
    Location
    Buckinghamshire, England
    MS-Off Ver
    2013
    Posts
    61

    Number of Working days between 2 dates

    Hi All,

    I'm currently working on a file that has employee holidays/sickness etc. What I want to do is be able to see is a DATE FROM and DATE TO and next to it the total amount of working days between and including those dates. On top of the since employee's sometimes like to take half days I need it so that it can determine half days as well.

    So for example I have an employee going to be off work from 29/10/2007 until 09/11/2007 12pm which is 10.5 days in total, but that includes weekends when I don't want it to. Also it comes out as 11 days at the moment because I can't figure out how to get it to determine is it is half a day.

    What formula should I use or if someone could create an example that would be really usefull :D

    kind regards
    Last edited by Madball; 10-11-2007 at 10:04 AM.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Take a look here

    http://support.microsoft.com/kb/259200

    http://www.bettersolutions.com/excel...A111880331.htm
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    10-02-2007
    Location
    Buckinghamshire, England
    MS-Off Ver
    2013
    Posts
    61
    errr that looks like Blah Blah Blah to me lol.....

  4. #4
    Registered User
    Join Date
    10-02-2007
    Location
    Buckinghamshire, England
    MS-Off Ver
    2013
    Posts
    61
    OK I have got it to work so that it removes all the bank holidays etc using the NETWORKDAYS() formula, but I have no idea to to get to take into count half days from 2 dates.

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    All dates show 12:00 AM by default do you mean 12:00PM? Assuming that you only have ½ days and not ¼ days or some other fraction....and assuming it could be a ½ day at the start or end of the period try

    =networkdays(A2,B2)-MOD(A2,1)-MOD(B2,1)

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Quote Originally Posted by Madball
    errr that looks like Blah Blah Blah to me lol.....
    Actually, it's surprising once you understand a bit more about "Blah Blah Blah", it's amazing what you can get out of it - keep at it!

  7. #7
    Registered User
    Join Date
    10-02-2007
    Location
    Buckinghamshire, England
    MS-Off Ver
    2013
    Posts
    61
    OK have have got NETWORKDAYS() to work, so for example there are 10 working days between 29/10/2007 and 09/11/2007. But the problem I'm having is, I cannot get it to figure in half days.

    For Example I have in cell A1 the heading DATE FROM and in cell B1 DATE TO. Then in Cell A2 and B2 I have the dates 29/10/2007. In Cell C2 using this formula =NETWORKDAYS(A2,B2) it will display the number 1. This is correct but but want it to display 0.5 if I put in cell A2 29/10/2007 - 12:00pm and in cell B2 29/10/2007.

    How do I get this to work?
    Last edited by Madball; 10-11-2007 at 10:50 AM.

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Try my suggestion above

  9. #9
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Try this one

  10. #10
    Registered User
    Join Date
    10-02-2007
    Location
    Buckinghamshire, England
    MS-Off Ver
    2013
    Posts
    61

    Smile

    Thanks a lot for this, it works great, Just wondering though, instead of having to put in a date for the Half day is there a way so you can put either PM or AM in and it will do the same?

  11. #11
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Here's an alternative with AM or PM count

  12. #12
    Registered User
    Join Date
    10-02-2007
    Location
    Buckinghamshire, England
    MS-Off Ver
    2013
    Posts
    61

    Smile

    OMG lol thanks a lot, I know I'm going to sound like a pain now, but is there a way for it to not count sickness and authorised absence. So where you put "AM and PM" if I put in SICK or ABSENT it wouldn't count those days off?

  13. #13
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Does this work for you?

+ 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