Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Overcome "expected end of statement error"
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Overcome "expected end of statement error"
try. Notice the double quotes
ActiveCell.Formula = "=SUMIF(OFFSET(Total,0,1),""0"",Total)" -- Don Guillett SalesAid Software "burl_rfc" wrote in message oups.com... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Where does an "On error resume next" statement apply? | Excel Programming | |||
What is Error "Method "Paste" of object "_Worksheet" failed? | Excel Programming | |||
Please help - expected record status "missing" | Excel Programming | |||
Getting "compile error" "method or data member not found" on reinstall | Excel Programming | |||
Need help in excel with "Statement invalid outside Type block. " error | Excel Programming |