+ Reply to Thread
Results 1 to 4 of 4

Need Help with Calculation of total hours with a positive output

Hybrid View

  1. #1
    Registered User
    Join Date
    12-20-2010
    Location
    NJ, USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Need Help with Calculation of total hours with a positive output

    Hi,

    I formatted two columns to military time format with a third column calculating the total hrs in each respective row. My problem is that once the hours key in are after midnight, I get an incorrect negative output in the calculating cell.

    e.g. A B C
    1900 0200 -1700
    NOTE: the total in C should be 7

    I have attached a sample of my file. Any help will be greatly appreciated.
    Attached Files Attached Files
    Last edited by mahri811; 01-03-2011 at 07:06 AM.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Need Help with Calculation of total hours with a positive output

    Hi,

    If you "CERTAIN" your Adjusted Hours will never exceed 24, then try:

    =IF(ISERROR((E2-D2)*24),"",IF(E2-D2<0,((E2+1)-D2)*24,(E2-D2)*24))
    in cell F2 and autofill down.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Registered User
    Join Date
    12-20-2010
    Location
    NJ, USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Need Help with Calculation of total hours with a positive output

    Thank you this worked perfectly!

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,695

    Re: Need Help with Calculation of total hours with a positive output

    I'd use this formula in D2 copied down and across

    =TEXT(B2,"00\:00")+0

    then in F2 copied down

    MOD(E2-D2,1)*24
    Audere est facere

+ 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