Time Calculation

kiko2max

New Member
Joined
Apr 25, 2018
Messages
7
Hello Masters, can someone help me to build the formula of time calculation. Let say I have 1 employee, he is working from 8am to 4pm a day (8 hours/day). Then I gave him a task yesterday start 8am and finish it today on 10am. The computation it must be 10 hours only. How can i make a formula for this?

thank you masters
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try This:

Mail Generator2.xlsm
ABCDEF
1StartEndHours
211/13/2020 8:0011/14/2020 10:0010:00:00
311/14/2020 8:0011/14/2020 15:007:00:00
4
Sheet1
Cell Formulas
RangeFormula
E2:E3E2=DAYS(C2,B2)*8/24 +MOD(C2,1)-MOD(B2,1)
 
Upvote 0
Solution
You're Welcome & Thanks for feedback.
And change Result column Number format to Custom and type [h]:mm:ss
 
Upvote 0
Are you have negetive results?
If Yes Then:
Excel Formula:
=IF(DAYS(C2,B2)*8/24 +MOD(C2,1)-MOD(B2,1)<0,0,DAYS(C2,B2)*8/24 +MOD(C2,1)-MOD(B2,1))
 
Upvote 0
Yes Im getting negative time because the database is trash. Anyway thanks again. You really help me a lot. God bless
 
Upvote 0

Forum statistics

Threads
1,214,414
Messages
6,119,373
Members
448,888
Latest member
Arle8907

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