Hours calculation

Corall

New Member
Joined
Sep 30, 2019
Messages
21
Hi,

Need some help:

ABCDEFGHI
Data StartData EndNameDATADay hourNight hourTOTAL
Name 11.sept. 2:001.sept. 5:00Name 11-sept.5+23+212
1.sept. 11:001.sept. 16:00 2-sept.4610
1.sept. 20:002.sept. 6:00
2.sept. 13:002.sept. 17:00Name 21-sept.6 6
Name 21.sept. 7:001.sept. 13:00
Name 31.sept. 7:001.sept. 11:00Nume 31-sept.4+3+1 8
1.sept. 16:001.sept. 19:00 2-sept. 44
1.sept. 21:002.sept. 2:00
Night hour 22:06
<colgroup><col width="64" style="width: 48pt;"> <col width="111" style="width: 83pt; mso-width-source: userset; mso-width-alt: 3953;" span="2"> <col width="64" style="width: 48pt;"> <col width="71" style="width: 53pt; mso-width-source: userset; mso-width-alt: 2531;"> <col width="82" style="width: 61pt; mso-width-source: userset; mso-width-alt: 2901;"> <col width="94" style="width: 71pt; mso-width-source: userset; mso-width-alt: 3356;"> <col width="71" style="width: 53pt; mso-width-source: userset; mso-width-alt: 2531;"> <col width="64" style="width: 48pt;"> <tbody> </tbody>

I want to calculate the hours worked by each employee, in 24 hours (from 0 to 24 hours in the same day).
The night hours will be calculated, if they are in the between 22:06.

Calculation example:

Name 1
worked on September 1, from 02:00 to 05:00, these hours (3 hours) will be passed at night because they are between 22:06. Also at night hours will be passed at 22:24 because the remaining hours will be passed on September 2, so it will be 3 + 2 = 5 hours at night.
The daylight hours are 5 + 2 = 7 hours a day.
For September 2 will pass 4 hours a day and 6 hours a night.
The same will be calculated for Name 2 .... Name 10


Thank you.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi,

If one did not understand what appeared in that table, I can clarify:
In cell B2 (actually in columns B and C there are dates and times) is given 1.09.2019 02:00:00 (September 1, 2019 at 02:00:00) and formatted appeared 1.sept. 2:00.
I would like to help me, with a formula, I can calculate, the working hours in the night (between 22:00 and 6:00), and the working hours of the day (between 6:00 and 22:00).
In cell G2 I would like to see 7 (not 5 + 2, I showed in the table, to understand where those numbers come from). Same for the G7 cell.

Thanks.
 
Last edited:
Upvote 0
Hi,

I managed to calculate the total number of hours for an employee (for the whole period).
I am unable to calculate the number of hours worked at night nor the hours worked during the day.
Nobody can help me?
 
Upvote 0
Thank you for your kindness and help.

I can not believe that no one knows a solution to the problem posted.
I think you didn't have the time / kindness to help me.
I wish you good health.
 
Upvote 0
Hi
People here are basically for one reason, is to help. I have been getting all kind of help and without this site, I would have still not learn the basic of excel. If no one answer (happened to me) is because the question was not clear or I did not provide clean and easy to understand excel sheet. I recommend to upload your sheet to google drive and share it (this was an advice from one of MVP here). I wanted to help because I am very interested in Time and Date functions but could not understand what you want to do.
 
Upvote 0

Forum statistics

Threads
1,214,594
Messages
6,120,436
Members
448,964
Latest member
Danni317

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