Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Why Networkdays returns 1

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Why Networkdays returns 1

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.

--
Rick (MVP - Excel)


"Jay" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Why Networkdays returns 1

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

"Jay" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Why Networkdays returns 1

Mike,

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

Jay

"Mike H" wrote:

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

"Jay" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Why Networkdays returns 1

Rick,

Thanks for the explanation about the range. I understand now.

Jay

"Rick Rothstein" wrote:

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.

--
Rick (MVP - Excel)


"Jay" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date returns always returns: 00 January 1900 ArcticWolf Excel Worksheet Functions 2 September 11th 08 12:31 PM
networkdays ann chan Excel Worksheet Functions 4 November 27th 06 05:25 PM
NETWORKDAYS [email protected] Excel Discussion (Misc queries) 2 November 21st 06 03:06 PM
NETWORKDAYS calculation returns inconsistent results Analowl Excel Worksheet Functions 1 August 30th 06 02:28 AM
NETWORKDAYS Help rsteiner1 Excel Worksheet Functions 0 August 10th 05 07:08 PM


All times are GMT +1. The time now is 11:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"