Using VBA with array formulas

DHS100

Board Regular
Joined
May 21, 2006
Messages
149
I want to programmatically use VBA to enter an array formula but it seems
to be treating the like normal formulas. If I manually go to the cell and ctrl+shift+enter, it works. How do I do this?

.Offset(8, 1).FormulaArray = "=MIN(LEN(MyData1))"

many thanks in advance
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
This worked when I tried it:

Code:
Sub Test()
    With ActiveCell
        .Offset(8, 1).FormulaArray = "=MIN(LEN(MyData1))"
    End With
End Sub

The target cell contained an array formula.

Also, this returned the expected result:

MsgBox Evaluate("=MIN(LEN(MyData1))")
 
Upvote 0

Forum statistics

Threads
1,215,650
Messages
6,126,017
Members
449,280
Latest member
Miahr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top