billi Posted October 3, 2010 Posted October 3, 2010 i'm looking for a little help with a calculation. I'm sure this is a breeze for most of you. but i have a very limited knowledge of the calculation language. ok here is is. I want to calculate total hours paid when up to 8 hours is straight pay 8 to 12 hours is x1.5 pay 12 to 14 hours is x2.0 pay thanks
Raybaudi Posted October 3, 2010 Posted October 3, 2010 Try: Case( WH > 12 ; 12 + Mod ( WH ; 12 ) * 2 ; WH > 8 ; 8 + Mod ( WH ; 8 ) * 1.5 ; WH )
comment Posted October 3, 2010 Posted October 3, 2010 Another way to look at it: ( Min ( Hours ; 8 ) + Min ( Max ( 0 ; Hours - 8 ) ; 4 ) * 1.5 + Max ( 0 ; Hours - 12 ) * 2 ) * Rate
comment Posted October 3, 2010 Posted October 3, 2010 I am not sure this part is what they want: WH > 12 ; 12 + Mod ( WH ; 12 ) * 2 ; I think that when hours > 12, you need to split them as: 8 * 1 + 4 * 1.5 + Mod ( WH ; 12 ) * 2 or shortly: WH > 12 ; 14 + Mod ( WH ; 12 ) * 2 ;
Raybaudi Posted October 3, 2010 Posted October 3, 2010 WH > 12 ; 14 + Mod ( WH ; 12 ) * 2 ; Yes, this is correct.
comment Posted October 3, 2010 Posted October 3, 2010 There was another thing that was bothering me re using Mod(), but I couldn't remember what it was. Suppose you have managed to work 24 hours or more...
Recommended Posts
This topic is 5223 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now