+ Reply to Thread
Results 1 to 6 of 6

employee time sheet

Hybrid View

  1. #1
    Registered User
    Join Date
    10-27-2007
    Posts
    15

    employee time sheet

    I am new here and i am really looking for help. My instructor gave us assignment of how to create a formular in hours field to calculate total hours work minus the lunch break.

    It has

    Start Lunch out Lunch in End
    11.30 am 11.45 am 12.30 pm 1.14pm

    Please help me how do i calculate the total hours work minus lunch break.


    Thank you

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Hi gomumy,

    Think of it this way:

    To get the total hours worked you must subtract the lunch break from the total hours between initial In and last Out punch, right?

    So if your values are in A1, B1, C1 and D1 (IN, LUNCH-OUT, LUNCH-IN, OUT):
    =(D1-A1)-(C1-B1)

    Resulting in:
    =(1:14PM - 11:30AM)-(12:30PM - 11:45AM)

    Another option would be to just add up the two divisions in the day worked (BEFORE LUNCH + AFTER LUNCH):
    =(B1-A1)+(D1-C1)

    Resulting in:
    =(11:45AM - 11:30AM)+(1:14PM - 12:30PM)

  3. #3
    Registered User
    Join Date
    10-27-2007
    Posts
    15
    Hi

    Thanks for the info, but i didnt get the answer, all i got was value. I checked it at t he formular bar, and it kind of say error. I dont know how else to do the formula. Its really confusing.

  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
    See if link helps

    http://www.cpearson.com/excel/overtime.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 !!!

  5. #5
    Registered User
    Join Date
    10-27-2007
    Posts
    15
    Thank you for the link. I did it exactly the way it was shown on the link, but my result kept saying #value. Is that normal.

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    Thank you for the link. I did it exactly the way it was shown on the link, but my result kept saying #value. Is that normal.
    try something like this
    =ROUNDDOWN(((E7<D7)+E7-D7+(G7<F7)+G7-F7)/TIME(0,15,0),0)*TIME(0,15,0)

    PHP Code: 
    7:00 AM    12:00 PM    12:30 PM    3:45 PM
    in           Lunch       lunch out    finish
    D7          E7          F7               G7 
    enter the time as 24hr clock

+ 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