How to solve VBA - FormulaArray error 1004?
05:03 17 Mar 2023

I get error 1004:

Unable to set the FormulaArray property of the Range class

running the following code:

Worksheets("Discriminatory_power").Range("G11").FormulaArray = "=INDEX(Import_data!A10:E1048576,MATCH(1,(Import_data!A10:A1048576=A11)*(Import_data!D10:D1048576=O8)*(Import_data!C10:C1048576=L7),0),MATCH(L4,Import_data!A10:F10,0))"
excel vba excel-formula