I'm trying to get the long-hand version of the below formula to work in my VBA - The formula below works perfectly.

[SUMPRODUCT((D5:D500<>"")/COUNTIF(D5:D500,D5:D500&""))]

I've tried several iterations of the following but I either return '0' or 'Error2015' - The formula below returns zero

Application.Evaluate("SUMPRODUCT((D5:D500<>"")/COUNTIF(D5:D500,D5:D500&""))")

Thanks for any assistance helping me understand what I'm doing wrong

Rt91