View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Sharad Naik Sharad Naik is offline
external usenet poster
 
Posts: 212
Default Using DateValue function

Well Ralph I made a mistake makeing it to work as DateValue(DateValueUS).
Since DaveValueUS is already date value, again DateValue() is causing the
error.

SO try below:

ActiveCell.FormulaR1C1 = _
"=IF(RC[-2]=(DATEVALUE(""1986/1/1"")),(" & DATEVALUEUS &
"-RC[3]),(" & DATEVALUEUS & "-RC[-2]))"
Sharad
"Ralph Elmerick" wrote in message
...
Sharad Thanks.
I tried your suggestion and now I get
=IF(D2=(DATEVALUE("1986/1/1")),(DATEVALUE(38353)-I2),(DATEVALUE(38353)-D
2))
in the field with #VALUE in the field. The DateValueUS is indeed 38353
so we have made progress it just does not provide the value I need for
the number of days. It is not making the subtraction between the dates.

Thanks



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!