View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Application error

stuff like With and .Cells() works in VBA, but not in a worksheet formula.
--
Gary''s Student - gsnu200856


"salgud" wrote:

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