Hello Vanessa,
Select a sufficiently long area with 2 columns and array-enter:
=Pstat("count",B1:B999=1,A1:A999)
Pstat is a UDF I wrote. You can find it he
http://sulprobil.com/html/pstat.html
Just press ALT + F11, insert a new (macro) module, copy my macro text
into it and go back to your worksheet and use it like an other
worksheet function.
BTW: I would rather not do this with a SUMPRODUCT approach:
http://sulprobil.com/html/sumproduct.html
Regards,
Bernd