CountIF on Filtered data

S

Steadman

I have a column of Data that I use a filter on to get desired records. In
some of the columns I have answers like A, B, C and I do a
COUNTIF(CELLRANGE, "A") and it works fine for the entire sheet. Is there a
way to get the countif only to count the items on the filter list.
Column 1 Column 2
Male A
Female A
Male A
Female A
Male B
Male B
Female B
Female B

So on the countif above I get 4 since 4 are A
When I do a filter for only Male, I would like the countif to show only 2
since there are only 2 males that selected A

Is there a way to do this? Any assistance would be appreciated.
 
B

Bob Phillips

=SUMPRODUCT(SUBTOTAL(3,OFFSET(B1:B100,ROW(B1:B100 )-MIN(ROW(B1:B100 )),,1))*
(B1:B100="A"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top