+ Reply to Thread
Results 1 to 3 of 3

calculate number of hours between two date/time combinations

Hybrid View

  1. #1
    Registered User
    Join Date
    12-15-2009
    Location
    Houston, TX, USA
    MS-Off Ver
    Excel 2007
    Posts
    86

    calculate number of hours between two date/time combinations

    Hello,
    I am trying to find a way to calculate the number of hours between date/times found in separate rows. The attached data set will help to envision what I am talking about.

    For each couple of rows, I need to find a way to calculate the number of hours elapsed from row 1 to row 2. In the first example, to calculate the number of hours between 12/2/2009 8:56:51 and 12/4/2009 6:35:27.

    any help is appreciated!

    Thank you
    Attached Files Attached Files
    Last edited by smokebreak; 01-21-2010 at 11:10 AM.

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

    Re: calculate number of hours between two date/time combinations

    Assuming the sample to be accurate (ie integer as time) and assuming time values greater than noon are entered as 130420 then

    =(A3+TEXT(B3,"00\:00\:00"))-(A2+TEXT(B2,"00\:00\:00"))
    format as [hh]:mm:ss
    Using your example the above would result in 45:38:36 ... if you want this in decimal form (45.64333...) then multiply by 24 and format as General / Number rather than Time.

  3. #3
    Registered User
    Join Date
    12-15-2009
    Location
    Houston, TX, USA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: calculate number of hours between two date/time combinations

    Worked like a charm. Thank you Don, I can't add any more reputation to you until someone else answers my questions

+ 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