work hours and extra hours

winstonshu

New Member
Joined
Dec 6, 2018
Messages
3
=IF(G2<=8,G2*$J$2,IF(G2<10,8*$J$2+(G2-8)*1.25*$J$2,IF(G2>10,8*$J$2+2*1.25*$J$2+(G2-10)*1.5*$J$2)))+IF(C2=6,G2*1.5*$J$2-G2*$J$2,0)+IF(C2=7,G2*2*$J$2-G2*$J$2,0)

C2=6
C2=7

6 and 7 are the days. it works fine with 8 hours work, but more than 8 years it doesnt work

the terms are:
work 1 hour- 43.5
8 hours-100$
2 hours extra work-125%
more than 2 hours- 150%
day 6(c2=6)=150% all day
day 7(c2=7)=200% all day
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
If you need help you are going to need to be clearer. What is in G2? J2? As for the terms what do the first two mean?
 
Upvote 0
If you need help you are going to need to be clearer. What is in G2? J2? As for the terms what do the first two mean?

G2- decimal presence e.g from 7:30 to 17:20 - 9:50 hours and 9.83 decimal
J2- salary per hour (43.5$)
the first two means:
salary per hour- 43.5%
8 hours a day-100%(8*43.5)

i only have problem with day 6 and day 7
in day 6: 150% all day(1.5*43.5)
in day 7: 200% all day

more than 8 years- the calculation doesnt work out



****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">decimal</body>****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">decimaldecimal</body>
 
Upvote 0
Test to see if this works:

=IF(C2=7,2*G2*J2,IF(C2=6,1.5*G2*J2,J2*(MIN(8,G2)+1.25*MIN(2,MAX(G2-8,0))+MAX(0,1.5*(G2-10)))))
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top