Creating array formulaes in macro

R

Raj

Hi all,

I have a simple question... When I create an array formulae, I press
Ctrl+Shift+Enter to make it function correctly. My question is if I want to
create an array formulae in VB Editor then what code will facilitate me in
doing that.

REgards
Raj
 
B

Bob Phillips

Raj

Use the FormulaArray property, example

ActiveCell.FormulaArray = "=SUM(IF(A1:A10=""a"",B1:B10))"
 
Top