I am trying to convert a working Excel Funtion "=SUMPRODUCT((A7:A1000<>"")*(A7:A1000<>0))" to VBA Code as follows:
Set y = WorksheetFunction.SumProduct(("A7:A1000" <> "") * ("A7:A1000" <> 0))
Range("A2").Value = y
The problem is I am getting a "Compile Error: Type Mismatch."
I am not familary enough with the SumProduct to understand what is causing the error. VBA will not allow me to use "On error resume next."
I am attempting to count non-blank cells in range of cells containing cells which contain formulas.