+ Reply to Thread
Results 1 to 4 of 4

Time Sheet Function

Hybrid View

  1. #1
    Registered User
    Join Date
    10-04-2007
    Posts
    1

    Time Sheet Function

    I'm looking for a way to calculate my clock in and out time to tenths of an hour. Actually to round(not sure which way) my clock ins and outs. Where A1 would represent my clock in time say 6:47a and A2 would represent clock out at 3:14p, column A formatted for time h:mm. What I want to know is how many tenths am I actually being paid for since my timeworked is recorded in tenths.
    Last edited by VBA Noob; 10-04-2007 at 04:47 PM.

  2. #2
    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
    See if link helps. Look under
    Rounding Times
    http://www.cpearson.com/excel/datearith.htm

    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 !!!

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,080
    If A1 = start time and B1 = end time and C1 = B1 - A1

    then

    =INT(C1/0.041666*60/6)

    will give you the number of tenths you are being paid.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719
    Do you want to round the start and end times to the nearest tenth of an hour and calculate the difference, or calculate the difference then round it?..... there's a difference.

    If it's the latter and you want the result as a decimal, i.e. 8.5 for your example use the formula

    =ROUND((A2-A1)*24,1)

    If you need to accommodate shifts which start one day and end the next, e.g. 22:00 to 06:00 then change to

    =ROUND(MOD(A2-A1,1)*24,1)

+ 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