Forum Discussion
Calculate wage by hours
- Apr 03, 2022
It would be better if you provided the general rule, but with your example:
Let's say start time is in A2 and end time in B2.
=24*MOD(TIME(1,0,0)-A2,1)*2000+24*(B2-TIME(1,0,0))*2500
Format the cell with the formula as General or as Currency.
It would be better if you provided the general rule, but with your example:
Let's say start time is in A2 and end time in B2.
=24*MOD(TIME(1,0,0)-A2,1)*2000+24*(B2-TIME(1,0,0))*2500
Format the cell with the formula as General or as Currency.
I will try to be more exactly, please check the next example:
A. B. C. D
1 Name Clock In. Clock out. Wage
2. Julia. 19:00. 3:00 ?
3. Andrea. 21:00 4:00. ?
Wage hours
From 19:00 to 1:00 ¥2,000. From 1:00 to 5:00 ¥2.500
I will appreciate your help. Thank you
MASB70
- HansVogelaarApr 03, 2022MVP
Sample workbook attached
- MASB70Apr 11, 2022Copper Contributor
Hans,
let me ask you about the formula, I realized the formula presents a problem when the schedule does not exceed 24:00 hours, it calculates the wrong salary amount, Please, check the attached.
I will appreciate your help.
Thank you.
- HansVogelaarApr 11, 2022MVP
MASB70 Here is a modified formula and demo workbook.
=24*((MIN(TIME(12,0,0),MOD(C2-TIME(13,0,0),1))-MIN(TIME(12,0,0),MOD(B2-TIME(13,0,0),1)))*2000+(MAX(TIME(12,0,0),MOD(C2-TIME(13,0,0),1))-MAX(TIME(12,0,0),MOD(B2-TIME(13,0,0),1)))*2500)
- MASB70Apr 03, 2022Copper ContributorThank you very much for your time.