+ Reply to Thread
Results 1 to 2 of 2

Calculating number of hours greater than 24 hours

Hybrid View

  1. #1
    Registered User
    Join Date
    07-29-2009
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2003
    Posts
    1

    Calculating number of hours greater than 24 hours

    Hi,

    I need to calculate the number of hours occuring between two times. Some of the times occur within 24 hours of each other and some occur greater than 24 hours apart. On the sheet is listed the date in, time in date out time out. I have figured out how to make the calculation if the time out occurs within 24 hours of the time in. However I do not get a correct calculation if the times are greater than 24 hours apart. Is there a way to calculate both correctly.

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

    Re: Calculating number of hours greater than 24 hours

    It's not clear from your explanation if the date & time values are one cell or are in fact separate cells (ie Date in cell A, Time in cell B etc...)

    Assuming DateTime values, In Col A, Out Col B then to get total time passed:

    C1: =B1-A1
    formatted to [hh]:mm

    If on the other hand Date In is Col A, Time In is Col B, Date Out is in Col C, Time Out is in Col D then to get total time passed:

    C1: =SUM(C1:D1)-SUM(A1:B1)
    formatted to [hh]: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