If your version of Excel is using a language other than English, then you'll need to translate the formula accordingly.
For example, in Portuguese:
=SOMARPRODUTO(1/CONTAR.SE(D5:D36;D5:D36))
(And your end reference should be 36, not 37, otherwise you'll have a circular reference.)
Regards
Bookmarks