ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   NETWORKDAYS Calculation Problem (https://www.excelbanter.com/excel-programming/357447-networkdays-calculation-problem.html)

stacy[_2_]

NETWORKDAYS Calculation Problem
 
Hello...

I have a quick, and probably insanely easy question regarding the
calculation of NETWORKDAYS. I cannot get the following formula to
return a "0" value:

=IF(F23="",0,NETWORKDAYS(E23,F23,L$6:L$14)-SIGN(F23-E23))

E23 F23 G23
03/09/06 03/09/06 1

In G23, the formula above returns "1" and not "0". If I change F23 to
03/10/06, I get "1", which is correct. And if I change F23 to
03/08/06, I get "-1" which is correct. What am I missing??

Thanks in advance for what I am sure is a simple fix...


[email protected]

NETWORKDAYS Calculation Problem
 
Hello,

I suggest to take
=IF(F23="",0,NETWORKDAYS(E23,F23,L$6:L$14)-SIGN(F23-E23+0.5))
or to have a look at http://www.sulprobil.com/html/date_formulas.html

NETWORKDAYS includes both start and ending date but your SIGN fct
returns 0 if both dates are equal (so add 0.5).

HTH,
Bernd


Tom Ogilvy

NETWORKDAYS Calculation Problem
 
=IF(F23="",0,(ABS(NETWORKDAYS(E23,F23,L$6:L$14))-1)*SIGN(F23-E23))

--
Regards,
Tom Ogilvy


"stacy" wrote:

Hello...

I have a quick, and probably insanely easy question regarding the
calculation of NETWORKDAYS. I cannot get the following formula to
return a "0" value:

=IF(F23="",0,NETWORKDAYS(E23,F23,L$6:L$14)-SIGN(F23-E23))

E23 F23 G23
03/09/06 03/09/06 1

In G23, the formula above returns "1" and not "0". If I change F23 to
03/10/06, I get "1", which is correct. And if I change F23 to
03/08/06, I get "-1" which is correct. What am I missing??

Thanks in advance for what I am sure is a simple fix...




All times are GMT +1. The time now is 02:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com