hi there. go to the link in my signature "Tips & Tutorials I Compiled" & download the file. Sheet 10 would be roughly what you want. you probably don't need multiplying though. so using that eg. say you want to do a COUNTIF of those where column B equals Range 2, then:
=COUNTIF(B8:B19,"Range 1")
mixing it with Autofilter would be:
=SUMPRODUCT(SUBTOTAL(3,OFFSET(B8,ROW(B8:B19)-ROW(B8),))*(B8:B19="Range 1"))
Bookmarks