+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : Formula to calculate Hrs worked less break if working more than 5 hrs for all shifts

  1. #1
    Registered User
    Join Date
    01-02-2012
    Location
    Davenport, FL
    MS-Off Ver
    excel 2010
    Posts
    17

    Formula to calculate Hrs worked less break if working more than 5 hrs for all shifts

    I am creating a work schedule for 12 employees in excel 2007. The schedule will contain “Time In”, “Time Out” and total hours worked for that day. And total hours worked for the particular week. I need a formula that will calculate the “Time In”, “Time Out” in a separate cell, say (A1=Time In, A2=Time out and A3=hours worked). And if the hours worked for that day are more than 5, then deduct a 30 minute lunch break, if less than 5 hours worked, then no lunch break taken. Then sum all the hours worked for that particular work week in a separate cell at the end of the schedule. See below sample:


    SEE IMAGE: Attachment 134642

    I have 2 formulas that work half way. Which is to say, that the first will work for the 3rd shift and will deduct the break but not for the 1st and 2nd shift. The other formula works for the 1st and 2nd shift but not for the 3rd. See below:

    This formula works for 3rd shift =IF(B8+1-A8<1/24*5,B8+1-A8,B8+1-A8-1/48)

    This formula works for the 1st and 2n shifts. =IF(B10-A10<1/24*5.6,B10-A10+(B10<A10),B10-A10-1/48)

  2. #2
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Formula to calculate Hrs worked less break if working more than 5 hrs for all shi

    your yim,es in Start A1 End B1 and so forth across your page

    SUM(IF(B1-A1<5,B1-A1,B1-A1-TIME(,30,)),IF(D1-C1<5,D1-C1,D1-C1-TIME(,30,)),IF(F1-E1<5,F1-E1,F1-E1-TIME(,30,)),IF(H1-G1<5,H1-G1,H1-G1-TIME(,30,)),IF(J1-I1<5,J1-I1,J1-I1-TIME(,30,))) does it
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

+ 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