time schedule

william marinho

New Member
Joined
Aug 4, 2023
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Good morning, I must make a time schedule that tells me how many hours in the night shift i have worked, night shift is between 22:00 and 05:00 in the morning of the next day.
I am using this formula =IF(H17>=V$15;MOD(W$15-H17;1);IF(H17<=W$15;MOD(W$15-H17;1);(IF(K17>=V$15;MOD(K17-V$15;1);IF(K17<=V$15;MOD(K17-V$15;1);0))))) but if I work in a time different of 22:00 to 05:00 lets say 13:00 to 19:00 the cell shows me 21:00 when it should show 00:00. How can I fix it?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
All right my friend, it is working now, the only problem now is lets say, if I work from 00:00 to 06:00am, the couting should stop at 05:00.
This is to correct some errors from HR, so in this cell I only need to count the time between 22:00 to 05:00, all the work performed in other time schedule I have other cells for them. Thanx again for your help!!!
 
Upvote 0
All right my friend, it is working now, the only problem now is lets say, if I work from 00:00 to 06:00am, the couting should stop at 05:00.
This is to correct some errors from HR, so in this cell I only need to count the time between 22:00 to 05:00, all the work performed in other time schedule I have other cells for them. Thanx again for your help!!!
Ok … can you make that correction or do you need help?
I think you have enough info to make that adjustment.

Please mark the Post that provided the solution to your problem.
Muchas gracias!
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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