How would i convert the following formula (that works) to VBA, assuming row 3 is a VBA variable called myrow, column C is a variable (numeric) called col1 and column h is is a variable (numeric) called col2:
I tried:
Code:
=SUM(IF(FREQUENCY(C3:H3,C3:H3)>0,1))
I tried:
Code:
Evaluate("=SUM(IF(FREQUENCY(" & Range(Cells(myrow, col1), Cells(myrow, col2)) & "," & Range(Cells(myrow, col1), Cells(myrow, col2)) & ")>0,1))")