Hello,
I am trying to input below formula array into a cell M11, it returns me an error massage "Unable to set the FormulaArray property of the Range class":
lastrow_AFGR2 = Sheets("AFGR").Range("D:D").Find(what:="*", searchdirection:=xlPrevious).Row
Range("M11").FormulaArray = "=if(len(AFGR!RC[-1])<5,INDEX('Invoice (2)'!R1C4:R" & lastrow_invoice & "C4,MATCH(AFGR!RC[-9]&AFGR!RC[-7]&AFGR!RC[-1]&TRUE,'Invoice (2)'!R1C2:R" & lastrow_invoice & "C2&'Invoice (2)'!R1C18:R" & lastrow_invoice & "C18&'Invoice (2)'!R1C6:R" & lastrow_invoice & "C6 & 'Invoice (2)'!R1C24:R" & lastrow_invoice & "C24,0),1),INDEX('Invoice (2)'!R1C4:R" & lastrow_invoice & "C4,MATCH(AFGR!RC[-9]&AFGR!RC[-7]&AFGR!RC[-1]&TRUE,'Invoice (2)'!R1C2:R" & lastrow_invoice & "C2&'Invoice (2)'!R1C18:R" & lastrow_invoice & "C18&'Invoice (2)'!R1C7:R" & lastrow_invoice & "C7 & 'Invoice (2)'!R1C24:R" & lastrow_invoice & "C24,0),1))"
I don't want VBA to calculate the output but instead, input this formula so whenever the user change any of the criteria, the output will automatically change.
Thanks.
I am trying to input below formula array into a cell M11, it returns me an error massage "Unable to set the FormulaArray property of the Range class":
lastrow_AFGR2 = Sheets("AFGR").Range("D:D").Find(what:="*", searchdirection:=xlPrevious).Row
Range("M11").FormulaArray = "=if(len(AFGR!RC[-1])<5,INDEX('Invoice (2)'!R1C4:R" & lastrow_invoice & "C4,MATCH(AFGR!RC[-9]&AFGR!RC[-7]&AFGR!RC[-1]&TRUE,'Invoice (2)'!R1C2:R" & lastrow_invoice & "C2&'Invoice (2)'!R1C18:R" & lastrow_invoice & "C18&'Invoice (2)'!R1C6:R" & lastrow_invoice & "C6 & 'Invoice (2)'!R1C24:R" & lastrow_invoice & "C24,0),1),INDEX('Invoice (2)'!R1C4:R" & lastrow_invoice & "C4,MATCH(AFGR!RC[-9]&AFGR!RC[-7]&AFGR!RC[-1]&TRUE,'Invoice (2)'!R1C2:R" & lastrow_invoice & "C2&'Invoice (2)'!R1C18:R" & lastrow_invoice & "C18&'Invoice (2)'!R1C7:R" & lastrow_invoice & "C7 & 'Invoice (2)'!R1C24:R" & lastrow_invoice & "C24,0),1))"
I don't want VBA to calculate the output but instead, input this formula so whenever the user change any of the criteria, the output will automatically change.
Thanks.