Hello all,
I'm having difficulty transfering a worksheet function into VBA, assigning the result to a variable.
The function is
=SUMPRODUCT(1/COUNTIF(A3:A8,A3:A8))
How would I translate that into VBA. I keep getting type mismatches each time I assign it to the variable. Of course, I am using the application.worksheetfunction. etc prefix before doing this but to no avail.
Please can someone help. Thanks.
I'm having difficulty transfering a worksheet function into VBA, assigning the result to a variable.
The function is
=SUMPRODUCT(1/COUNTIF(A3:A8,A3:A8))
How would I translate that into VBA. I keep getting type mismatches each time I assign it to the variable. Of course, I am using the application.worksheetfunction. etc prefix before doing this but to no avail.
Please can someone help. Thanks.