+ Reply to Thread
Results 1 to 6 of 6

Time calculator

  1. #1
    Registered User
    Join Date
    02-08-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    80

    Time calculator

    Hi

    I am trying to calculate extra hors worked above 7.5 hrs.

    In column c2 = start time (custom format hh:mm)
    In column d2 = finisha time (custom format hh:mm)
    In column e2 = extra hours (formula =(D2-C2)-7.5 and cell is custom format hh:mm) reply i get is #######.

    PLease can someone tell me what i am going wrong.

    example below

    c2= 06:00
    d2= 17:00
    e2= d2(17:00)- c2(06:00)- 7.5 result should be 3.5hours.

    Any help appricated.

    Regards

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Time calculator

    try

    =d2-c2-7.5/24
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Contributor
    Join Date
    02-25-2008
    Location
    Windsor, ON Canada
    MS-Off Ver
    Excel 2007, 2003
    Posts
    119

    Re: Time calculator

    Try this:

    e2: d2-c2
    f2: 07:30
    g2: e2-f2

  4. #4
    Registered User
    Join Date
    02-08-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    80

    Re: Time calculator

    Hi

    I have used formula =d2-c2-7.5/24.

    I have draged this formula downward, unfortunatley in colum c where there is no value formula cell shows #######.

    Please advice what amendment is should use if colum c has no value then formula cell stays blank.

    I know for vlookup i use =if(iserror(???????????????).

    please advice.

    Regards

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Time calculator

    Try

    =IF(C2="","",d2-c2-7.5/24)
    or
    =IF(OR(C2="",D2=""),"",d2-c2-7.5/24)

    The latter will give blank when either of C2 or D2 are blank

  6. #6
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Time calculator

    Hi coolhit

    Try this; =IF(COUNTA($C2:$D2)<2,"",MOD($D2-$C2,1)*24-7.5)

+ 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