+ Reply to Thread
Results 1 to 6 of 6

Time Calculation

  1. #1
    Registered User
    Join Date
    03-26-2007
    Posts
    63

    Time Calculation

    Hi,

    I want to calculate a total time spent in hh:mm:ss format. Attached is a file that contains the transaction number, the in transaction in time, process time and transaction out time. I want to calculate the total time spent on each and every transaction. Please help.

    Thanks in Advance.

    Shane
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474
    =G2-D2
    gives you 0:40:00
    Format your range as time
    select the range
    go to format,cells,numbers,time
    select the time format you want

  3. #3
    Registered User
    Join Date
    03-26-2007
    Posts
    63

    Thanks

    Hi,

    Thanks for quick reply. I really appreciate ur help... However, just would like to know in case if In time is 5:51 PM and out time is4:15 AM in that case what do i do? As of now in such cases i am getting hash sighs (#######) .

    Best regards,
    Shane

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    =(D2>G2)+G2-D2
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  5. #5
    Registered User
    Join Date
    03-26-2007
    Posts
    63

    Thanks

    Thank you very ,uch . That resolves my issue.

    Thanks Dave and VBA Noob

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474
    try this, should work, may have to reformat your range as time again
    =IF(D2>G2,(G2+1)-D2,G2-D2)

+ 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