Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old April 4th 05, 09:25 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 122
Default How to I use nested quotation marks for 'SUMIF' function in Excel.

I'm writing a macro, creating a formula for an active cell using "SUMIF". I
need to use cell references that I can control via variables (aka 'cells'
with rownum and colnum notations, or named cell ranges derived from same).
Syntactically VBasic doesn't understand nested quotation marks for named cell
ranges. Additionally using 'Range(Cells..' gives compile errors. Is it
possible to accomplish this? Sample code?? Most grateful for help!!

  #2   Report Post  
Old April 5th 05, 12:05 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 186
Default How to I use nested quotation marks for 'SUMIF' function in Excel.

Hi Glenn,
Not sure if this will help, but here sample code that I used to insert a
formula.

Cells(RowCount, 4) = "=sum(D" & RowAnchor & "" & RowCount - 1 & ")"

RowCount and RowAnchor are variables I used.

"Glenn" wrote:

I'm writing a macro, creating a formula for an active cell using "SUMIF". I
need to use cell references that I can control via variables (aka 'cells'
with rownum and colnum notations, or named cell ranges derived from same).
Syntactically VBasic doesn't understand nested quotation marks for named cell
ranges. Additionally using 'Range(Cells..' gives compile errors. Is it
possible to accomplish this? Sample code?? Most grateful for help!!

  #3   Report Post  
Old April 5th 05, 12:10 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jun 2004
Posts: 14
Default How to I use nested quotation marks for 'SUMIF' function in Excel.

Hi Glen,

You can insert them via Chr(34). For example:
Cell.Formula = "SUMIF(A1:A10" & Chr(34) & "0" & Chr(34) & ")"

Cheers


"Glenn" wrote in message
...
I'm writing a macro, creating a formula for an active cell using "SUMIF".

I
need to use cell references that I can control via variables (aka 'cells'
with rownum and colnum notations, or named cell ranges derived from same).
Syntactically VBasic doesn't understand nested quotation marks for named

cell
ranges. Additionally using 'Range(Cells..' gives compile errors. Is it
possible to accomplish this? Sample code?? Most grateful for help!!



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
When do I use quotation marks in an Excel formula? Deb Excel Worksheet Functions 3 December 4th 09 07:00 PM
how do i add quotation marks to every item in a column in excel s4mans Excel Discussion (Misc queries) 0 April 15th 08 07:51 PM
How to stop Excel from inserting quotation marks into TXT files Dan Falk Excel Discussion (Misc queries) 1 April 13th 07 03:54 PM
Finding Quotation marks in Search function ahearn Excel Worksheet Functions 6 May 11th 06 12:00 AM
Excel Quotation Marks! MaxFrance Excel Discussion (Misc queries) 6 March 29th 05 10:45 AM


All times are GMT +1. The time now is 04:44 PM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017