View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Application error

maybe this

ws.Cells(7, 10).Formula = "=IF($H$7<"""",DATEDIF($H$7,$I$7,""d"")+1)"

Regards,
Peter T

"salgud" wrote in message
...
Does anybody see what's wrong with this code:

with ws
.Cells(7, 10).Formula =
"=IF(.cells(7,8)<"""",DATEDIF(.cells(7,8),.cells( 7,9),""d"")+1)"
end with

Thanks