ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Creating array formulaes in macro (https://www.excelbanter.com/excel-discussion-misc-queries/23954-creating-array-formulaes-macro.html)

Raj

Creating array formulaes in macro
 
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

Bob Phillips

Raj

Use the FormulaArray property, example

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


--
HTH

Bob Phillips

"Raj" wrote in message
...
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





All times are GMT +1. The time now is 09:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com