Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ed ed is offline
external usenet poster
 
Posts: 59
Default Double Quotes

I'm trying to write a formula into a cell using VBA. The
formula has quotes in it and this is causing me
problems. Can anyone convert the below 'formula' into
VBA code so that it will work?

activecell.formulaArray =

"SUM(IF('Data from Prc Qry'!$G$2:$G$15000=J$1,IF('Data
from Prc Qry'!$E$2:$E$15000=$A2,'Data from Prc Qry'!
$K$2:$K$15000,0),0))/COUNTIF('Data from Prc Qry'!
$A$2:$A$15000,$A2&" "&TEXT(J$1,"mm/dd/yyyy"))"

You might notice that this is an array formula - will
this use of double quotes still work as such?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Double Quotes

Where there is a double quote in your formula, put another one, thus:

="SUM(IF('Data from Prc Qry'!$G$2:$G$15000=J$1,IF('Data
from Prc Qry'!$E$2:$E$15000=$A2,'Data from Prc Qry'!
$K$2:$K$15000,0),0))/COUNTIF('Data from Prc Qry'!
$A$2:$A$15000,$A2&"" ""&TEXT(J$1,""mm/dd/yyyy""))"


"Ed" wrote in message ...
I'm trying to write a formula into a cell using VBA. The
formula has quotes in it and this is causing me
problems. Can anyone convert the below 'formula' into
VBA code so that it will work?

activecell.formulaArray =

"SUM(IF('Data from Prc Qry'!$G$2:$G$15000=J$1,IF('Data
from Prc Qry'!$E$2:$E$15000=$A2,'Data from Prc Qry'!
$K$2:$K$15000,0),0))/COUNTIF('Data from Prc Qry'!
$A$2:$A$15000,$A2&" "&TEXT(J$1,"mm/dd/yyyy"))"

You might notice that this is an array formula - will
this use of double quotes still work as such?

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
char(10) and double quotes JohnE Excel Worksheet Functions 2 March 11th 09 09:40 PM
double quotes used in cell Reshma Excel Discussion (Misc queries) 1 December 19th 08 10:02 AM
Double Quotes [email protected] New Users to Excel 2 July 20th 08 12:43 PM
Double Quotes PeterM Excel Discussion (Misc queries) 5 June 17th 08 05:12 PM
Double Quotes Ed Excel Programming 1 January 12th 04 09:18 PM


All times are GMT +1. The time now is 11:16 AM.

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"