View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default formulas in code error

Hi
make this
range("d2").formula = "=text(c2,""yyyy"")"

--
Regards
Frank Kabel
Frankfurt, Germany


Kou Vang wrote:
I am trying to write a macro and came across this error

range("d2").formula = "=text(c2,"yyyy")"

It keeps saying that the end statement for the "yyyy" is
wrong? I don't know if it is because of all the "s or
what? How do I get around this problem of inserting
formulas in the code itself? Thanks.