Entering Array Formula

G

Guest

Hi

I am trying to enter the following an array formula in
VBA:

Rng.FormulaArray = "=sum((One = A1)*(Two = "Hello"))

One and Two are named ranges.

The problem is the quotation mark around the
word "Hello". VBA does not like it. How can I make VBA to
like it. One way would be to name the word and use the
name. But it is just bugging me that I can not enter it
directly. Thanks for your suggestions.
 
H

Harald Staff

Hi

Quotes in strings are written as double quotes:

"=sum((One = A1)*(Two = ""Hello""))"

HTH. Best wishes Harald
 
Top