Networkdays function

TonyW1234

New Member
Joined
Jul 26, 2007
Messages
31
Hi,

I was wondering if anyone would be so kind to answer a simple query. I have used the networkdays formula in excel to workout the difference between 2 dates, the only problem is that when the dates are both the same dates it comes up as 1 instead of 0.

Could anyone advise please??

Thanks

Tony
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
NETWORKDAYS always counts both the start date and end date so if A1 is a monday

=NETWORKDAYS(A1,A1)=1

If your start and end dates are always weekdays then just use

=NETWORKDAYS(A1,B1)-1
 

TonyW1234

New Member
Joined
Jul 26, 2007
Messages
31
thanks guys, i've tried using the following formula but seem to be getting "2" as the answer between 2 dates that are the same - any ideas of how to get this to 0 or where im going wrong?

=IF(AND(I6>0,Q6>0),NETWORKDAYS(Q6,I6,holidays)+1,0)

thanks

Tony
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
You are adding one instead of subtracing 1, try

=IF(AND(I6>0,Q6>0),NETWORKDAYS(Q6,I6,holidays)-1,0)
 

Forum statistics

Threads
1,181,053
Messages
5,927,852
Members
436,573
Latest member
CMR237

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