Payroll Sunday hour calculation from in and out times

juhatalonen

New Member
Joined
Mar 26, 2014
Messages
3
Hello,


I have been looking for a solution from this forum but I havent found anything proper.

I am having some troubles with calculating sunday hours from in and out times.

Basically what I am looking for is something like this.

EXAMPLE:
[TABLE="width: 500"]
<tbody>[TR]
[TD]IN[/TD]
[TD]OUT[/TD]
[TD]SUNDAY HOURS[/TD]
[/TR]
[TR]
[TD]23.3.2014 09:00[/TD]
[TD]23.3.2014 21:00[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]23.3.2014 21:00[/TD]
[TD]24.3.2014 09:00[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]


Thank you all if You are able to help me.

Best Regards,
Juha Talonen
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Ist change the "." to "/" in all the dates i.e 23.3.2014 09:00 should read 23/3/2014 09:00

Then in C2 enter =TEXT(B2-A2,"h:mm") and copy down

By the way in both your examples there is 12 hours difference between the 2 times

Cheers
 
Upvote 0
Hi,
Try this simple formula

Code:
=IF(WEEKDAY(A2)=1,IF(WEEKDAY(B2)=1,B2-A2,1-MOD(A2,1)),IF(WEEKDAY(B2)=1,MOD(B2,1),0))

Sunday is 1 day of week (you can change this if you want)

Greetings
 
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

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