View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Excel Formula - Error 1004 - Bug? Mistake?

Either change the semi colons (;) to commas or use FormulaLocal rather than
Formula (assuming your list separator is set to semicolon).

However, I don't thing the formula will produce what you want.

Maybe you want an if statement
=If(A1=1,Sum(A3:A6),0)

--
Regards,
Tom Ogilvy

"Markus Wilthaner" wrote in message
m...
Hello,

I have a worksheet and the following line of code:
Me.Range("G11").Formula = "=SUMIF(A1;1;A3:A6)"

Excel says: 1004 Application error

What am I doing wrong? If I enter the exact same string as a formula,
everything works fine. Help! :)


Markus