Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where does an "On error resume next" statement apply? davegb Excel Programming 1 December 6th 06 08:45 PM
What is Error "Method "Paste" of object "_Worksheet" failed? vat Excel Programming 7 February 17th 06 08:05 PM
Please help - expected record status "missing" Hilton Excel Programming 1 October 14th 04 12:13 PM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM
Need help in excel with "Statement invalid outside Type block. " error Brent[_6_] Excel Programming 3 January 17th 04 03:03 AM


All times are GMT +1. The time now is 11:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"