View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Dates in Excel 2007

= IF(COUNT(D2,J2)=2,J2 - D2,"")
or
= IF(OR(D2="",J2=""),"",J2 - D2)
--
David Biddulph

Basenji wrote:
Using Excel 2007 data has been imported from Crystal Reports into an
Excel 2007 spreadsheet. Column D is Proc Date; column J is Confirm
Date. Column L is used to calculate the difference between the two
dates, L2 = J2 - D2. Column L is formatted with a general number to
show the number of days between the two dates. While the Proc Date is
available the Confirm Date is not always available, so the cell is
blank. In the calculation, L2, the numer that is returned is -40190,
indicating that it is taking January 1, 1900, and subtracting January
12, 2010. Is there a setting or some other way to prevent a default
date from being inserted when there is none so that ##### shows in
the calculated cell?