View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default Overcome "expected end of statement error"

ActiveCell.FormulaR1C1 = "=(SUMIF(OFFSET(Total,0,1),""0"",Total))"

to make it work you have to use double quotes
:)
susan


On Feb 20, 10:37 am, "burl_rfc" wrote:
I'm trying to insert the following formual in the actice cell, the VBA
editor gives me a error "expected end of statement". It is likely
caused by the parenthesis around the "0", once I remove them from the
"0" and make it 0 for example the error goes away, but obvioulsy my
formula would then not work. Any suggestions on how to get around
this.

ActiveCell.FormulaR1C1 = "=(SUMIF(OFFSET(Total,0,1),"0",Total))"

Thanks
burl_rfc