+ Reply to Thread
Results 1 to 9 of 9

calculate the amount of time between 2 dates (working hours)

  1. #1
    Registered User
    Join Date
    01-19-2012
    Location
    maple
    MS-Off Ver
    Excel 2003
    Posts
    6

    calculate the amount of time between 2 dates (working hours)

    Here is a screen shot untitled.JPG

    I'm trying to calculate the amount of time between C# and B#.

    This is for work, so I'm only interested in an 8 hour day, not the full 24. So, I'm trying to add an if statement that will remove the hours from 5:00pm-9:00am the following day. If the time out and the time in span more than 1 'overnight' then the statement needs to remove the hours from 5:00pm-9:00am for 2 days etc.

    I'm lost!

    The formula I currently am using to calculate the difference is: =((C3+(B3>C3)-B3)*24)

    I'm not an excel wiz, so I'd REALLY appreciate some help. I'd love even more to just cut and paste a formula

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: calculate the amount of time between 2 dates (working hours)

    PLease upload example workbook (remove all other private data)

  3. #3
    Registered User
    Join Date
    01-19-2012
    Location
    maple
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: calculate the amount of time between 2 dates (working hours)

    Quote Originally Posted by zbor View Post
    PLease upload example workbook (remove all other private data)
    I did. It's at the beginning of my post.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: calculate the amount of time between 2 dates (working hours)

    Example workbook. Not picture. Or I can edit picture and post it back

  5. #5
    Registered User
    Join Date
    01-19-2012
    Location
    maple
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: calculate the amount of time between 2 dates (working hours)

    Quote Originally Posted by zbor View Post
    Example workbook. Not picture. Or I can edit picture and post it back
    example.xls

    Here is the example workbook. I greatly appreciate your help.
    Last edited by rickyRRE; 01-19-2012 at 02:30 PM.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: calculate the amount of time between 2 dates (working hours)

    Check is this OK:
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-19-2012
    Location
    maple
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: calculate the amount of time between 2 dates (working hours)

    example.xlsxNo, doesn't work.

    The attached should be only 10 hours, but this shows 20

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: calculate the amount of time between 2 dates (working hours)

    OK, didn't consider weekend... Check now (you can also create Holiday list):
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-19-2012
    Location
    maple
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: calculate the amount of time between 2 dates (working hours)

    If I change the anything then I get the error #NAME?

    example.xlsx

+ 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