MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Array Functions in VBA

Posted by bill.roberts on March 21, 2000 7:51 AM


From VBA,
Simple functions can be assigned:

Cells(5, 4).Formula = "=SUBTOTAL(9,D7:D" & FinalRow & ")"

Array functions can be assigned:

Cells(6, 15).FormulaArray = "=SUM(IF(L7:L300=""NO"",IF(M7:M300>0,D7:D300,"""")))"

I was going to ASK the question (regards to ARRAY in VBA) but thought better of it and decided to try the macro recorder first.

And, I tried the macro recorder first just for you Celia!!!


Posted by Celia on March 21, 2000 4:46 PM

Congratulations! I am almost speechless.

Posted by bill.roberts on March 22, 2000 9:03 AM

I thought you would be <grin>!!!