Get minute difference between working days and hours

ellyzadg

Board Regular
Joined
May 9, 2016
Messages
75
Hi Everyone,

Would like to seek for your help on how can I get minute difference between two dates considering working days and working hours

Working days - Monday to Friday
Working Hours - 8AM - 6PM

Sample Scenario

[TABLE="width: 500"]
<tbody>[TR]
[TD]Start Date[/TD]
[TD]Finished Date[/TD]
[TD]Desired Result in minutes[/TD]
[/TR]
[TR]
[TD]2/14/2018 6:30:00 PM[/TD]
[TD]2/14/2018 8:45:00 AM[/TD]
[TD]45 mins[/TD]
[/TR]
[TR]
[TD]2/15/2018 6:00:00 PM[/TD]
[TD]2/18/2018 8:30:00 AM[/TD]
[TD]30 mins[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Thank you in advance! :)
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi Elli,
You could try this formula
Code:
[COLOR=#444444][FONT=Calibri]=((((B2-A2)-(DAYS(B2,A2)+1-NETWORKDAYS.INTL(A2,B2,1)))*24)-10)*60[/FONT][/COLOR]
Where A2 has the start datetime and B2 has the end datetime
Cheers
Sergio
 
Upvote 0
oh yes you are right, your not working hours are 14 not 10 in your case, so the formula is
Code:
=((((B2-A2)-(DAYS(B2,A2)+1-NETWORKDAYS.INTL(A2,B2,1)))*24)-14)*60
Btw your first row data start date time is greater then finished date time you shod correct this
Cheers
Sergio
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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