Hello Firends,
I am trying to insert the formula in the range of cells through a VBA code as below but it says that "Unable to set the formula array property of the range class" for the second formula. The first one works just fine. Can anyone please check & let me know what have I done wrong
This one works
But this does not
Regards,
Humayun
I am trying to insert the formula in the range of cells through a VBA code as below but it says that "Unable to set the formula array property of the range class" for the second formula. The first one works just fine. Can anyone please check & let me know what have I done wrong
This one works
VBA Code:
ws.Range("AC2").FormulaArray = "=IFERROR(INDEX(fri_dpi_labtest_date,MATCH(1,($A2=fri_dpi_labtest_po)*(""FRI 2""=fri_dpi_labtest_category),0)),"""")"
ws.Range("AC2:AC2000").FillDown
But this does not
VBA Code:
ws.Range("AC2").FormulaArray = "=IFERROR(IF(AB2=""Not Applicable"",""Not Applicable"",IF(INDEX(fri_dpi_labtest_quantity,MATCH(1,($A2=fri_dpi_labtest_po)*(""FRI 1""=fri_dpi_labtest_category),0))<L2*98%,INDEX(fri_dpi_labtest_date,MATCH(1,($A2=fri_dpi_labtest_po)*(""FRI 2""=fri_dpi_labtest_category),0)),""Not Applicable"")),"""")"
ws.Range("AC2:AC2000").FillDown
Regards,
Humayun