View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Niek Otten Niek Otten is offline
external usenet poster
 
Posts: 3,440
Default formulas including ; character

The ";" character is a local list separator. The international list
separator is "',". So either use

Cells(1, 1).Formula = "=IF(C30,1,0)"

or

Cells(1, 1).FormulaLocal = "=IF(C30;1;0)"

but this depends on the local version of your "IF" formula

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"Tomasz Lelek" wrote in message
...
Hello, I encouterd problem (Aplication defined or object defined error)
while trying to insert formula from macro to newly created template
worksheet. Problem occurs not always, but with formulas including

character
";", like IF(a;b;c). Code line looks like this one:
Cells(1, 1).Formula = "=IF(C30;1;0)", and it doesnt matter if I put value
or ommit formula expression.
Please help.