#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Leon
 
Posts: n/a
Default Excel Dates

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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Excel Dates

if(b1<now(),networkdays(a1,b1),0)

would seem to be the easiest fix

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Excel Dates

except of course it should have been b1now() as we want the
calculation to happen if B1 is a future date - sorry about that!!!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Excel Dates

Try this:

=MAX(0,NETWORKDAYS(A1,B1))

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Leon" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Leon
 
Posts: n/a
Default Excel Dates

Thanks to the both of you thats exactly what i needed.


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
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
Can you export dates in Excel to a calendar? lexi95 Excel Discussion (Misc queries) 1 November 22nd 05 10:10 PM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Ensure dates imported into Excel 2003 are shown in DD/MM/YYY form. KymY Excel Discussion (Misc queries) 3 February 11th 05 02:28 PM


All times are GMT +1. The time now is 01:40 AM.

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"