SOLVED

How calculate working hours

%3CLINGO-SUB%20id%3D%22lingo-sub-2456712%22%20slang%3D%22en-US%22%3EHow%20calculate%20working%20hours%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2456712%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20can%20you%20all%20please%20tell%20me%20how%20to%20calculate%20the%20total%20working%20hours%3F%20The%20start%20time%20is%208AM%2C%20End%20Time%20is%205PM.%20Deduct%20lunchtime%20for%201%20HOUR.%26nbsp%3B%3C%2FP%3E%3CTABLE%20border%3D%220%22%20width%3D%22452%22%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%22312%22%20height%3D%2229%22%3EDATE%3C%2FTD%3E%3CTD%20width%3D%22140%22%3ETIME%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F01%3C%2FTD%3E%3CTD%3E7%3A36%3A00%20AM%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F01%3C%2FTD%3E%3CTD%3E8%3A39%3A00%20AM%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F01%3C%2FTD%3E%3CTD%3E5%3A01%3A19%20PM%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F02%3C%2FTD%3E%3CTD%3E7%3A03%3A07%20AM%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F02%3C%2FTD%3E%3CTD%3E7%3A18%3A54%20AM%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F02%3C%2FTD%3E%3CTD%3E8%3A02%3A42%20AM%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F02%3C%2FTD%3E%3CTD%3E8%3A32%3A28%20AM%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F02%3C%2FTD%3E%3CTD%3E5%3A03%3A20%20PM%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F02%3C%2FTD%3E%3CTD%3E5%3A53%3A42%20PM%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2456712%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2457258%22%20slang%3D%22en-US%22%3ERe%3A%20How%20calculate%20working%20hours%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2457258%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1081085%22%20target%3D%22_blank%22%3E%40ANNABELLABLOG%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20do%20the%20times%20in%20your%20table%20mean%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2458068%22%20slang%3D%22de-DE%22%3ESubject%3A%20How%20to%20calculate%20working%20hours%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2458068%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1081085%22%20target%3D%22_blank%22%3E%40ANNABELLABLOG%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20a%20small%20approach%2C%20hope%20that%20helps.%3CBR%20%2F%3EOtherwise%2C%20as%20Mr.%20Hans%20Vogelaar%20has%20already%20written%20to%20you%2C%20please%20explain%20in%20more%20detail.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20be%20happy%20to%20know%20if%20I%20could%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E*%20Kindly%20Mark%20and%20Vote%20this%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2461618%22%20slang%3D%22en-US%22%3ERe%3A%20How%20calculate%20working%20hours%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2461618%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%20border%3D%220%22%20width%3D%22452%22%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%22312%22%20height%3D%2229%22%3EE%3C%2FTD%3E%3CTD%20width%3D%22140%22%3ETIME%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F01%3C%2FTD%3E%3CTD%3E7%3A36%3A00%20AM%20(Clock%20In)%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F01%3C%2FTD%3E%3CTD%3E8%3A39%3A00%20AM%20(Clock%20In%20again)%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F01%3C%2FTD%3E%3CTD%3E5%3A01%3A19%20PM%20(Clock%20out)%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F02%3C%2FTD%3E%3CTD%3E7%3A03%3A07%20AM%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F02%3C%2FTD%3E%3CTD%3E7%3A18%3A54%20AM%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F02%3C%2FTD%3E%3CTD%3E8%3A02%3A42%20AM%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F02%3C%2FTD%3E%3CTD%3E8%3A32%3A28%20AM%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F02%3C%2FTD%3E%3CTD%3E5%3A03%3A20%20PM%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2229%22%3E2021%2F02%2F02%3C%2FTD%3E%3CTD%3E5%3A53%3A42%20PM%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAbove%20the%20table%20is%20an%20employee's%20attendance%20record.%26nbsp%3B%20However%2C%20the%20standard%20of%20working%20hours%20in%20our%20company%20starts%20from%208%20am%20till%205%20pm.%26nbsp%3B%20The%20lunch%20hour%20will%20be%20deducted%20for%201%20hour.%26nbsp%3B%20%26nbsp%3BYou%20may%20see%20the%20example%20above%2C%20there%20is%20the%20double%20clock%20in%20which%20are%207%3A36%20am%20and%208%3A39%20am.%20Then%2C%20I'd%20like%20to%20calculate%20it%20start%20from%207%3A36%20am%20but%20not%2008%3A39%20am%20and%20end%20at%205%3A01%3A19%20pm.%26nbsp%3B%20Now%2C%20I%20don't%20have%20an%20idea%20of%20how%20to%20formulate%20it.%26nbsp%3B%20Hopefully%2C%20professor%20Excel%20could%20help%20me%20solve%20this%20problem.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2461654%22%20slang%3D%22en-US%22%3ERe%3A%20How%20calculate%20working%20hours%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2461654%22%20slang%3D%22en-US%22%3EAnother%20one%20is%20there%20is%20flexible%20time%20for%20employees%20.%20For%20the%20sample%20above%2C%20how%20to%20calculate%20working%20hours%20start%20from%2007%3A36am%20till%205%3A01%3A19%20and%20deducted%20for%201%20hour%20luchbreak%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2461696%22%20slang%3D%22en-US%22%3ERe%3A%20How%20calculate%20working%20hours%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2461696%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKindly%20open%20the%20document%20attached.%20Thank%20you%20so%20much.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2461703%22%20slang%3D%22en-US%22%3EBetreff%3A%20How%20calculate%20working%20hours%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2461703%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F722750%22%20target%3D%22_blank%22%3E%40NikolinoDE%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKindly%20open%20the%20file%20as%20attached.%26nbsp%3B%20Thank%20you%20so%20much.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi, can you all please tell me how to calculate the total working hours? The start time is 8AM, End Time is 5PM. Deduct lunchtime for 1 HOUR. 

DATETIME
2021/02/017:36:00 AM
2021/02/018:39:00 AM
2021/02/015:01:19 PM
2021/02/027:03:07 AM
2021/02/027:18:54 AM
2021/02/028:02:42 AM
2021/02/028:32:28 AM
2021/02/025:03:20 PM
2021/02/025:53:42 PM

 

10 Replies

@ANNABELLABLOG 

What do the times in your table mean?

@ANNABELLABLOG 

Here is a small approach, hope that helps.
Otherwise, as Mr. Hans Vogelaar has already written to you, please explain in more detail.

 

 

I would be happy to know if I could help.

 

 

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

@Hans Vogelaar 

ETIME
2021/02/017:36:00 AM (Clock In)
2021/02/018:39:00 AM (Clock In again)
2021/02/015:01:19 PM (Clock out)
2021/02/027:03:07 AM 
2021/02/027:18:54 AM
2021/02/028:02:42 AM
2021/02/028:32:28 AM
2021/02/025:03:20 PM
2021/02/025:53:42 PM

 

Above the table is an employee's attendance record.  However, the standard of working hours in our company starts from 8 am till 5 pm.  The lunch hour will be deducted for 1 hour.   You may see the example above, there is the double clock in which are 7:36 am and 8:39 am. Then, I'd like to calculate it start from 7:36 am but not 08:39 am and end at 5:01:19 pm.  Now, I don't have an idea of how to formulate it.  Hopefully, professor Excel could help me solve this problem.

 

Another one is there is flexible time for employees . For the sample above, how to calculate working hours start from 07:36am till 5:01:19 and deducted for 1 hour luchbreak?

@Hans Vogelaar 

 

Kindly open the document attached. Thank you so much.

@NikolinoDE 

 

Kindly open the file as attached.  Thank you so much.

best response confirmed by allyreckerman (Microsoft)
Solution

@ANNABELLABLOG 

See the attached version. I used formulas that should work in all versions of Excel. If you have Excel 2019 or Excel in Microsoft 365, they could be simplified by using MINIFS and MAXIFS.

Thanks for the prompt reply. And thanks again for helping me formulate the working time.

@ANNABELLABLOG In case you are not on a Mac, using Excel 2013 or later and interested in a solution that doesn't involve a large number of formulae, perhaps Power Query is something for you.

 

I looked at the file you uploaded ("sample 1"), and notice you have data for several employees and months. I assume that the data will grow over time and that you want to summarise the working hours by employee/month (or perhaps by week). Then it would be easier to clean-up the time records and transform them into a neat table (via Power query) that can be the basis for a pivot table. I also noticed several instances where employees checked IN, but not OUT. Or IN twice but not OUT. Or OUT but not IN. Obviously, these entries will cause errors in an automated solution, with out extra measures. And I may not have spotted them all.

 

For what it's worth, the attached workbook takes your data into Power Query and presents a pivot table, summarising working hours (OUT -/- IN -/- 1 hour for lunch) per employee/month. It will take some learning, but certainly worth it if this is a recurring task involving large data sets. Set it up properly once and it will take a few seconds to refresh, whenever you need.

@ANNABELLABLOG 

In your sample workbook, Luk checks in on 2021/02/01 but doesn't check out. The same for Kho on 2021/02/02, etc.