Total worker duration

Heera

New Member
Joined
Feb 3, 2015
Messages
20
Hello Team,

Can anyone please simplify the below requirement?

I am looking for a total worker working hours from the time of start of the shift to the end of the shift.

Please add the formulae or create a template and share with me. Sample data are shown below :

User Name Login Time Logout Time
Bayleigh Osmer31.1.2018 5:57:06 PM31.1.2018 9:40:10 PM
Adam Davis31.1.2018 4:04:12 PM31.1.2018 8:14:23 PM
Adam Davis1.2.2018 11:58:59 AM
Adam Davis1.2.2018 12:39:33 PM
Adam Davis1.2.2018 12:49:08 PM
Adam Davis1.2.2018 12:59:30 PM1.2.2018 1:10:05 PM
Adam Davis1.2.2018 1:14:58 PM1.2.2018 1:20:34 PM
Brittany Tharps31.1.2018 4:44:50 PM31.1.2018 6:22:59 PM
Brittany Tharps31.1.2018 6:56:06 PM31.1.2018 7:37:03 PM
Brittany Tharps31.1.2018 8:10:37 PM31.1.2018 8:51:08 PM
Brittany Tharps31.1.2018 9:06:53 PM31.1.2018 11:27:16 PM

<colgroup><col><col span="2"></colgroup><tbody>
</tbody>

I have total 200 workers.

Regards,
Heera
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
What date format does your system use?
What are your regional settings for dates?

Is the data shown real dates and times or Text

N.B. The solution works with Regional setting of dd-mmm-yy



Excel 2010
ABCDE
2Bayleigh Osmer31.1.2018 5:57:06 PM31.1.2018 9:40:10 PM03:43:043.71778
3Bayleigh Osmer31-Jan-18 17:57:0631-Jan-18 21:40:1003:43:043.71778
4
1a
Cell Formulas
RangeFormula
D2=SUBSTITUTE(C2,".","-")-SUBSTITUTE(B2,".","-")
D3=C3-B3
E2=(SUBSTITUTE(C2,".","-")-SUBSTITUTE(B2,".","-"))*24
E3=(C3-B3)*24
 
Last edited:
Upvote 0
Hi Dave,

Thank you for your reply. When I am pasting D2 formulae it is giving me #Value ! error. Can you please help me with the other way?

Is it possible for me to send the excel file?

Regards,
Heera
 
Upvote 0
You did not answer the questions in post #2 .
date format does your system use?
What are your regional settings for dates?
Is the data shown real dates and times or Text

You can post a concise example of your data; see help information on the site and suggested add-ins.
 
Upvote 0
Hi Dave,

Here is my date system format :

Short date: 2/5/2018
Long date: s Monday, February 05, 2018
Short time : 9:43 PM

Time zone : (UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi

I am getting this data from the application. After exporting to excel, the data and time format is showing in general format. I tried changing to another format which is available in date option but it is not changing.

Please help.

Regards,
Heera
 
Upvote 0
You advised that your system's settings for dates are mm/dd/yy and the data is Text.
Is mm/dd/yy the date format that you use in your Country?

Please answer the following questions.
1. Can the "application" export the data as True dates and times?

2. What are the expected results with the example that your posted and how did you calculate the results?
 
Upvote 0
try
=TIMEVALUE(TRIM(RIGHT(C2,11)))-TIMEVALUE(TRIM(RIGHT(B2,11)))
 
Upvote 0
Hi Dave,

Thanks for your reply. How can we fix the below dates? When the date is changing I am getting #### value in the cell after inserting the above formulae.

User Name Login Time Logout TimeResult
Precious Kelly31.1.2018 10:19:08 PM1.2.2018 6:42:20 AM########
Justin Taylor31.1.2018 10:51:39 PM1.2.2018 1:19:15 AM########
Patricia Chandler31.1.2018 4:26:08 PM1.2.2018 12:58:07 AM########

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
You did not answer the questions in Post # 6 !
What progress have you made with the suggestions?
You did not indicate the times straddled midnight.

Please post a clear example of your challenge.
Your example should include expected results.
 
Upvote 0

Excel 2010
ABCDEF
18Precious Kelly31-Jan-18 22:19:0801-Feb-18 6:42:208.39
19
20User NameLogin TimeLogout TimeDecimal
21Precious Kelly31.1.2018 10:19:08 PM1.2.2018 6:42:20 AM22:19:0806:42:208.39
22Justin Taylor31.1.2018 10:51:39 PM1.2.2018 1:19:15 AM22:51:3901:19:152.46
23Patricia Chandler31.1.2018 4:26:08 PM1.2.2018 12:58:07 AM16:26:0800:58:078.53
24
25
1a
Cell Formulas
RangeFormula
F18=(C18-B18)*24
F21=IF(D21>E21,(1-D21+E21)*24,(E21-D21)*24)
F22=IF(D22>E22,(1-D22+E22)*24,(E22-D22)*24)
F23=IF(D23>E23,(1-D23+E23)*24,(E23-D23)*24)
D21=TIMEVALUE(TRIM(RIGHT(B21,11)))
D22=TIMEVALUE(TRIM(RIGHT(B22,11)))
D23=TIMEVALUE(TRIM(RIGHT(B23,11)))
E21=TIMEVALUE(TRIM(RIGHT(C21,11)))
E22=TIMEVALUE(TRIM(RIGHT(C22,11)))
E23=TIMEVALUE(TRIM(RIGHT(C23,11)))
 
Upvote 0

Forum statistics

Threads
1,214,515
Messages
6,119,973
Members
448,933
Latest member
Bluedbw

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