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

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
1,836
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
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)
 
Solution

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
1,836
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
You're Welcome & Thanks for feedback.
And change Result column Number format to Custom and type [h]:mm:ss
 

kiko2max

New Member
Joined
Apr 25, 2018
Messages
7

ADVERTISEMENT

Th
You're Welcome & Thanks for feedback.
And change Result column Number format to Custom and type [h]:mm:ss
Thank you master, my next task is to get the average time.
 

kiko2max

New Member
Joined
Apr 25, 2018
Messages
7
Hello master, what if i get ####### and convert it to zero? What is the formula?
 

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
1,836
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
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))
 

kiko2max

New Member
Joined
Apr 25, 2018
Messages
7
Yes Im getting negative time because the database is trash. Anyway thanks again. You really help me a lot. God bless
 

Watch MrExcel Video

Forum statistics

Threads
1,130,119
Messages
5,640,233
Members
417,131
Latest member
Seanr19871

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
Top