formula help needed


Posted by Lisa on July 30, 2001 5:28 AM

my spreadsheet needs to automatically calculate the number of days between two dates. i would like to enter the dates over a period of time. if both dates are not available i would like to see "insufficient data" in the cell. as it is now it will display a negative number. How do i get it to show either the number of days between the two dates or insufficient data if there are not two dates to calculate betwee.



Posted by Aladin Akyurek on July 30, 2001 5:52 AM

Lisa,

Lets say that the earlier dates in A from A1 on and later ones in B from B1 on. You want to compute the difference in C.

In C1 enter: =IF(AND(ISNUMBER(A1),ISNUMBER(B1)),B1-A1,"Insufficient Data")

Aladin

============