Networkdays calculate hours between date and time.

Weeble

Board Regular
Joined
Nov 30, 2016
Messages
95
Office Version
  1. 365
Trying to solve a time issue.

[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]Arrival time[/TD]
[TD]Unload date[/TD]
[TD]Unload complete[/TD]
[TD]Completed[/TD]
[TD]Total time[/TD]
[/TR]
[TR]
[TD]11:30[/TD]
[TD]02-okt[/TD]
[TD]02-okt[/TD]
[TD]12:30[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10:30[/TD]
[TD]02-okt[/TD]
[TD]03-okt[/TD]
[TD]9:30[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13:00[/TD]
[TD]06-okt[/TD]
[TD]09-okt[/TD]
[TD]8:00[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


I want to be able to get how many hours from Arrival to completed my order has taken.
I am assuming I need to work with =networkdays
Code:
=NETWORKDAYS(B2;C2;WEEKEND!A3:A28)
Which returns 24 hours. But how do I take the time in account here aswell? I want a formula in E2 that returns 1hour, E3 should return 23 hours, and E4 should return 19 hours (6-okt being a friday).

Would it be easier if I merged B + A and C + D together? or is it possible to do without it?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Try:

=NETWORKDAYS(B2;C2;WEEKEND!A3:A28)-1+(D2-A2)


Note:

Set Number Format for Column E to: [h]:mm
 
Last edited:
Upvote 0
I tried it out and it only works on the days where unload date and unload complete is the same date. If completion date is > than unload date, the cell just turns ##############.
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,320
Members
452,635
Latest member
laura12345

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