ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Programatically Entering an Array Formula (https://www.excelbanter.com/excel-programming/305265-programatically-entering-array-formula.html)

John C.[_4_]

Programatically Entering an Array Formula
 
I have a form that provides the user many options.

Once form has been completed, based on that information, I
wish to enter a formula into a worksheet cell using VBA.

Could someone share the syntax for doing this?

Tom Ogilvy

Programatically Entering an Array Formula
 
activeCell.Formula = "=Sum(A1:A10)"

if, as your subject implies, you want an array formula

ActiveCell.FormulaArray = "=Sum((B1:B10=""A"")*(C1:C10=""B"")*D1:D10)"

--
Regards,
Tom Ogilvy

"John C." wrote in message
...
I have a form that provides the user many options.

Once form has been completed, based on that information, I
wish to enter a formula into a worksheet cell using VBA.

Could someone share the syntax for doing this?





All times are GMT +1. The time now is 02:18 AM.

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