October 3, 201015 yr 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
October 3, 201015 yr Try: Case( WH > 12 ; 12 + Mod ( WH ; 12 ) * 2 ; WH > 8 ; 8 + Mod ( WH ; 8 ) * 1.5 ; WH )
October 3, 201015 yr Another way to look at it: ( Min ( Hours ; 8 ) + Min ( Max ( 0 ; Hours - 8 ) ; 4 ) * 1.5 + Max ( 0 ; Hours - 12 ) * 2 ) * Rate
October 3, 201015 yr 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 ;
October 3, 201015 yr 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...
Create an account or sign in to comment