![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 11:54 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com