+ Reply to Thread
Results 1 to 10 of 10

Time and a half

  1. #1
    Forum Contributor
    Join Date
    03-09-2007
    Location
    Australia
    MS-Off Ver
    Office 10
    Posts
    371

    Time and a half

    I have attached an example of a worksheet which I have been developing for the purpose of assisting in getting a weekly payroll right.
    The basis is
    Any hours over 8 and up to 10 monday to Fri are time and a half - any hours after 10 are at double monday to fri
    on Sat the fist 2 hours are time and a half the rest are at double
    Sunday - all hours at double

    The existing code in 32 and 33 work wonderfully well providing that work happens each day monday to fri but if your look at the Row f32 you can see the problem. the code puts the figure into negative.
    Because he was sick on one day and had an RDO on the other - the result is -14 - this should show 2 [because of the 2hours on Saturday]

    Any suggestions on how to fix this please
    Attached Files Attached Files

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Time and a half

    I don't see your "problem"

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Time and a half

    In F2, try this array formula:

    =IF(SUM(F10:F14)=0, 0, SUM(IF(F10:F14-8>2,2,IF(F10:F14-8<0,0,F10:F14-8))))+SUM(IF(F15:F16>2,2,F15:F16))
    Last edited by JBeaucaire; 09-08-2012 at 07:50 AM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Contributor
    Join Date
    03-09-2007
    Location
    Australia
    MS-Off Ver
    Office 10
    Posts
    371

    Re: Time and a half

    Many thanks that works really well

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Time and a half

    If that takes care of your posted question, please select Thread Tools from the menu above and mark the thread as solved. Thanks.

  6. #6
    Forum Contributor
    Join Date
    03-09-2007
    Location
    Australia
    MS-Off Ver
    Office 10
    Posts
    371

    Re: Time and a half

    Thanks for the help
    But I still have the "#Value" problem when there is no data in rows 10-16
    Sometime the people will not work any hours that week

    Help appreciated
    l

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Time and a half

    Your original formula has a text string in it, remove that. Replace it with a 0 instead. I've edited post #3 and highlighted that change in red.

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Time and a half

    Actually, you don't even really need that part. The simpler array formula would be:

    =SUM(IF(F10:F14-8>2,2,IF(F10:F14-8<0,0,F10:F14-8)))+SUM(IF(F15:F16>2,2,F15:F16))

  9. #9
    Forum Contributor
    Join Date
    03-09-2007
    Location
    Australia
    MS-Off Ver
    Office 10
    Posts
    371

    Re: Time and a half

    Appreciate your assistance
    Many thanks

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Time and a half

    I have marked this thread solved for you.
    In the future please select Thread Tools from the menu above and mark the thread as solved. Thanks.

+ 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