Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
DateDIFF
Hello -
I have a spreadsheet where I store the names and expiration dates of a number of documents. I have a cell where I place a NOW() In a column next to the expiration date of each document I have placed a DateDIF which checks the interval between NOW() and the date of the document's expiration and returns the number of days until the document expires. Here, the current date (NOW()) is stored in cell C1, the document expiration date resides in E63, and the interval is days D. Like this: =DATEDIF($C$1,$E$63, "D") This works fine until the document has actually expired and then I get a #NUM! error. I would like some code to change this #NUM! to 'EXPIRED' Thanks, Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
DateDIFF
Paul,
Try =IF(ISERROR(DATEDIF($C$1,$E$63,"D")),"EXPIRED",DAT EDIF($C$1,$E$63,"D")) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Paul Breslin" wrote in message ... Hello - I have a spreadsheet where I store the names and expiration dates of a number of documents. I have a cell where I place a NOW() In a column next to the expiration date of each document I have placed a DateDIF which checks the interval between NOW() and the date of the document's expiration and returns the number of days until the document expires. Here, the current date (NOW()) is stored in cell C1, the document expiration date resides in E63, and the interval is days D. Like this: =DATEDIF($C$1,$E$63, "D") This works fine until the document has actually expired and then I get a #NUM! error. I would like some code to change this #NUM! to 'EXPIRED' Thanks, Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Where is DateDiff function in Excel 2002 ? | Excel Worksheet Functions | |||
Help with datediff vba | Excel Programming | |||
DateDiff in Excel | Excel Programming | |||
Application.WorkSheetFunction.DafeDif (not DateDiff) | Excel Programming | |||
DateDiff problem | Excel Programming |