Why Networkdays returns 1

J

Jay

Hi,

I am using Networkdays to calculate the difference between two dates. But if
the dates are the same, it returns 1, not 0. I have a workaround, but I am
curious why subtracting two serial numbers that are the same produces 1 not 0.

Thanks,

Jay
 
R

Rick Rothstein

The NETWORKDAYS function doesn't give you the difference in days between two
dates, it gives you the number of day in the range. If your start and end
dates are the same, then there is one day in the range (assuming that date
is not a weekend)... the date itself. If you need the difference in days,
then just subtract 1 from the value returned by the NETWORKDAYS function.
 
M

Mike H

Jay,

That's how networkdays works.

If you are due to work 2/4/2009 and do so finishing on 2/4/2009 I bet you
would want paying for 1 days work.

Mike
 
J

Jay

Mike,

Thanks for the explanation - it's easy to understand when it's explained in
financial terms.

Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top