Villalobos
Active Member
Hello,
I would need a bit help to set FormulaArray property. In my sample file (on worksheet Evaluation, column H9:H until lastrow) I would like to count the unique "Internal code" per material but I receive Run-time error 1004, unable to set the FormulaArray property of the Range Class.
Here stop the code:
Could somebody help me to find that where I made mistake?
I attached the sample file.
Thanks in advance!
I would need a bit help to set FormulaArray property. In my sample file (on worksheet Evaluation, column H9:H until lastrow) I would like to count the unique "Internal code" per material but I receive Run-time error 1004, unable to set the FormulaArray property of the Range Class.
Here stop the code:
Code:
.Range("$H9:$H" & OutputLastRow2).FormulaArray = "=SUM(IF(FREQUENCY(IF('" & SourceSheet3.Name & "'$E$9:$E$" & SourceLastRow3 & " =B9,IF('" & SourceSheet3.Name & "'$M$9:$M$" & SourceLastRow3 & "<>"",MATCH(""&'" & SourceSheet3.Name & "'$M$9:$M$" & SourceLastRow3 & ",'" & SourceSheet3.Name & "'$M$9:$M$" & SourceLastRow3 & "&"",0))),ROW('" & SourceSheet3.Name & "'$M$9:$M$" & SourceLastRow3 & ")-ROW('" & SourceSheet3.Name & "'$M$9" & SourceLastRow3 & ")+1),1))"
Could somebody help me to find that where I made mistake?
I attached the sample file.
Thanks in advance!