Hi,

I'm new to VBA and need a little help.

I'm trying to put the below Formula Array in a cell using VBA but I get an "Run-Time Error 1004 Application-Defined or object-defined error"

=IFERROR(INDEX(Meals,(SMALL(IF(Meals[Meal]=$A$1,ROW(Meals[Meal])),ROW(1:1)))-1,2),"")

When I put the formula in the cell and press CTRL + SHIFT + ENTER , it works fine though.

I'm not really sure why this is happening, I'm guessing it has to do with the Table Meals? Meals is a table in another worksheet but same Workbook.