Hi Im using the networkdays function to calculate the days remining until an
expiry
date. but when the expiry date is pasted the days remaining goes into minus
figures. Is there any way to stop this so the days remaining stay at zero.
eg.
=NETWORKDAYS(A1,B1)
A1 B1 C1
Todays date Expiry date days remaining
17/05/06 14/04/06 -24if(b1lt;now(),networkdays(a1,b1),0)
would seem to be the easiest fixexcept of course it should have been b1gt;now() as we want the
calculation to happen if B1 is a future date - sorry about that!!!Try this:
=MAX(0,NETWORKDAYS(A1,B1))
Does that help?
***********
Regards,
Ron
XL2002, WinXPquot;Leonquot; wrote:
gt; Hi Im using the networkdays function to calculate the days remining until an
gt; expiry
gt; date. but when the expiry date is pasted the days remaining goes into minus
gt; figures. Is there any way to stop this so the days remaining stay at zero.
gt; eg.
gt;
gt; =NETWORKDAYS(A1,B1)
gt;
gt; A1 B1 C1
gt; Todays date Expiry date days remaining
gt; 17/05/06 14/04/06 -24
gt;
Thanks to the both of you thats exactly what i needed.
expiry
date. but when the expiry date is pasted the days remaining goes into minus
figures. Is there any way to stop this so the days remaining stay at zero.
eg.
=NETWORKDAYS(A1,B1)
A1 B1 C1
Todays date Expiry date days remaining
17/05/06 14/04/06 -24if(b1lt;now(),networkdays(a1,b1),0)
would seem to be the easiest fixexcept of course it should have been b1gt;now() as we want the
calculation to happen if B1 is a future date - sorry about that!!!Try this:
=MAX(0,NETWORKDAYS(A1,B1))
Does that help?
***********
Regards,
Ron
XL2002, WinXPquot;Leonquot; wrote:
gt; Hi Im using the networkdays function to calculate the days remining until an
gt; expiry
gt; date. but when the expiry date is pasted the days remaining goes into minus
gt; figures. Is there any way to stop this so the days remaining stay at zero.
gt; eg.
gt;
gt; =NETWORKDAYS(A1,B1)
gt;
gt; A1 B1 C1
gt; Todays date Expiry date days remaining
gt; 17/05/06 14/04/06 -24
gt;
Thanks to the both of you thats exactly what i needed.
文章標籤
全站熱搜
