+ Reply to Thread
Results 1 to 5 of 5

Overtime computation and lunch break formula with IF and AND

  1. #1
    Registered User
    Join Date
    12-07-2005
    Posts
    9

    Overtime computation and lunch break formula with IF and AND

    Hi - I'm having a heckuva time trying to create a formula that will enable me to create an employee work schedule that will alert the manager to scheduled overtimes. The criterium are:

    - if employee works 6-8 hours, they get .5 hour lunch break that does not get factored into their total hours for the week

    - if employee works 8 hours or more, they get 1.0 hour lunch break

    How do I write the formula to recognize if they worked >= 6 (but <8) and >=8, and have either .5 or 1.0 hours as appropriate deducted from the daily total hours?

    Assume that start time is A3, end time is B3, and total daily hours is B4

    Once I have that, I can easily total actual paid hours for the week.

    THANK YOU THANK YOU THANK YOU!!!

  2. #2
    Bob Phillips
    Guest

    Re: Overtime computation and lunch break formula with IF and AND

    =hours_worked-(hours_worked>6)*.5-(hours_worked>8)*.5

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "navychef" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi - I'm having a heckuva time trying to create a formula that will
    > enable me to create an employee work schedule that will alert the
    > manager to scheduled overtimes. The criterium are:
    >
    > - if employee works 6-8 hours, they get .5 hour lunch break that does
    > not get factored into their total hours for the week
    >
    > - if employee works 8 hours or more, they get 1.0 hour lunch break
    >
    > How do I write the formula to recognize if they worked >= 6 (but <8)
    > and >=8, and have either .5 or 1.0 hours as appropriate deducted from
    > the daily total hours?
    >
    > Assume that start time is A3, end time is B3, and total daily hours is
    > B4
    >
    > Once I have that, I can easily total actual paid hours for the week.
    >
    > THANK YOU THANK YOU THANK YOU!!!
    >
    >
    > --
    > navychef
    > ------------------------------------------------------------------------
    > navychef's Profile:

    http://www.excelforum.com/member.php...o&userid=29457
    > View this thread: http://www.excelforum.com/showthread...hreadid=491668
    >




  3. #3
    Registered User
    Join Date
    12-07-2005
    Posts
    9
    AWESOME! Thank you SO MUCH!

    That is REALLY perfect, I wasn't anywhere close to it! Formula works great. I just added in an = to also subtract the .5 when it's equal to 6 hours.

    THANK YOU!!!!!!!!!!!

    Bob

  4. #4
    Gord Dibben
    Guest

    Re: Overtime computation and lunch break formula with IF and AND

    Check out Chip Pearson's timesheet site.

    http://www.cpearson.com/excel/overtime.htm


    Gord Dibben Excel MVP

    On Wed, 7 Dec 2005 17:23:12 -0600, navychef
    <[email protected]> wrote:

    >
    >Hi - I'm having a heckuva time trying to create a formula that will
    >enable me to create an employee work schedule that will alert the
    >manager to scheduled overtimes. The criterium are:
    >
    >- if employee works 6-8 hours, they get .5 hour lunch break that does
    >not get factored into their total hours for the week
    >
    >- if employee works 8 hours or more, they get 1.0 hour lunch break
    >
    >How do I write the formula to recognize if they worked >= 6 (but <8)
    >and >=8, and have either .5 or 1.0 hours as appropriate deducted from
    >the daily total hours?
    >
    >Assume that start time is A3, end time is B3, and total daily hours is
    >B4
    >
    >Once I have that, I can easily total actual paid hours for the week.
    >
    >THANK YOU THANK YOU THANK YOU!!!


  5. #5
    Bob Phillips
    Guest

    Re: Overtime computation and lunch break formula with IF and AND

    Really, that surprises me. I would have thought that once you go over 6
    hours it would mean that a lunch-break was taken, otherwise not. Still, no
    matter, you got it working which is the important thing.

    Regards

    Bob


    "navychef" <[email protected]> wrote in
    message news:[email protected]...
    >
    > AWESOME! Thank you SO MUCH!
    >
    > That is REALLY perfect, I wasn't anywhere close to it! Formula works
    > great. I just added in an = to also subtract the .5 when it's equal to
    > 6 hours.
    >
    > THANK YOU!!!!!!!!!!!
    >
    > Bob
    >
    >
    > --
    > navychef
    > ------------------------------------------------------------------------
    > navychef's Profile:

    http://www.excelforum.com/member.php...o&userid=29457
    > View this thread: http://www.excelforum.com/showthread...hreadid=491668
    >




+ 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