orgetorix

New Member
Joined
Feb 6, 2012
Messages
7
Hello all. I am trying to use the NETWORKDAYS formula to calculate two values:


1. Number of work days between order date and required date.
2. Number of work days between order date and invoiced date.


I do not want the formula to count the receipt date so I am able to get around this using something like
=(NETWORKDAYS(A2,C2))-1


Using this, 'Value 1' above is fine because orders are always required in the future. For 'Value 2' this also works if both dates are the same (0) or if the order is late and therefore a positive number.


The problem exists when the order is actually early and the invoice date is before the required date. In this case, the formula returns a value that is two days earlier than expected. How can I modify this so both numbers are correct? I have attached a sample workbook with some examples.


https://1drv.ms/x/s!AjtV5i3TBbxqg_IC2z05ZT0oVNEYxw


Thanks in advance for all comments and help!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Re: NETWORKDAYS help

Try formula in D2 =NETWORKDAYS(B2,C2)+IF(B2>C2,1,-1)

Does it help?

Biz
 
Upvote 0

Forum statistics

Threads
1,214,638
Messages
6,120,674
Members
448,977
Latest member
moonlight6

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