# Networkdays function

#### TonyW1234

##### New Member
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.

#### DiscoPistol

##### Active Member
I've just tried it and it comes up with '0'

What dates are you using?

DP

#### barry houdini

##### MrExcel MVP
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
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
You are adding one instead of subtracing 1, try

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

#### TonyW1234

##### New Member
thanks for the help, sorted it now!

Cheers

Tony

Replies
1
Views
681
Replies
4
Views
860
Replies
7
Views
368
Replies
18
Views
661
Replies
3
Views
134

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

### 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