+ Reply to Thread
Results 1 to 5 of 5

Calculating Time Intervals

Hybrid View

  1. #1
    Registered User
    Join Date
    10-05-2005
    Posts
    34

    Calculating Time Intervals

    Okay please notice the time spans several days I would like to get the total amount of hours eclipsed from the start time to the end time.

    Any help would be apprieciated.

    HTML Code: 

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    If you don't care about business hours, weekends, holidays, etc.. just straight up how many hours are between these two times, use this formula:

    =IF(B2="","",(B2-A2)*24)

    If B2 is blank, you obviously don't want to subtract A2 from blank, hence the IF formula.

    This will give you a result like 823.20 hours, not 823 hours 12 minutes. (Although you could use custom formatting to make it look differently.)

  3. #3
    Registered User
    Join Date
    10-05-2005
    Posts
    34

    Thanks for information still need..

    Can someone also help with omitting specific days and only getting work days?

    Since we work sometimes on Saturday can we identify this in the formula as well as we don't always have a specific 8-5 work day. So again if I can set those times that would be helpful. But if not I can use the standard info of no weekends workday 8-5.

    Thanks in advance for the information

  4. #4
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517

    Week Days

    The WEEKDAY() function will tell you what day any particular date falls on.

    Knowing the day of the week for the first day and for the last day and the total number of days between them it is possible to work out how many saturdays and sundays fall between these two dates.

    Also the NETWORKDAYS() will tell you how many days there are between two dates without counting Saturdays and Sundays.

    subtracting the NETWORKDAYS() from the total number of days will tell you how many "non-working" days were worked

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    If you just want to count 08:00 to 17:00 weekdays and A2 contains start time/date and B2 end time/date then, assuming the start and end will always be within those business hours you can calculate the business hours using this formula

    =(NETWORKDAYS(A2,B2)-1)*3/8+MOD(B2,1)-MOD(A2,1)

    format as [h]:mm

+ 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