Using Countif with autofillter

J

John

I am trying to use auto filter with the "countif" function?


This Formula gives me a percent for the hole document:

=(COUNTIF(AK3:AK5000,9)+COUNTIF(AK3:AK5000,10))/COUNT(AK3:AK5000)

I want to be able to auto filter the data and have the percent from the
above function change to reflect only the visible info. Basically trying to
count only the number 9 and the number 10 for the visible info divided by the
total number of results within the same column.

ANYHELP????
 
P

Peo Sjoblom

Here you go


=SUMPRODUCT(($AK$3:$AK$5000={9,10})*(SUBTOTAL(3,OFFSET($AK$3,ROW($AK$3:$AK$5000)-MIN(ROW($AK$3:$AK$5000)),,))))/SUBTOTAL(2,$A$3:$AK$5000)



--


Regards,


Peo Sjoblom
 
J

John

Using this formula worked with the exception that the end result for example
was 8% yet the answer should have been 80% how to fix that?
 
P

Peo Sjoblom

I had a typo in the count formula ( I used A3 instead of AK3)
apologies

try


=SUMPRODUCT(($AK$3:$AK$5000={9,10})*(SUBTOTAL(3,OFFSET($AK$3,ROW($AK$3:$AK$5000)-MIN(ROW($AK$3:$AK$5000)),,))))/SUBTOTAL(2,$AK$3:$AK$5000)




--


Regards,


Peo Sjoblom
 
J

John

NICE

Thanks a bunch. I was lost.

Peo Sjoblom said:
I had a typo in the count formula ( I used A3 instead of AK3)
apologies

try


=SUMPRODUCT(($AK$3:$AK$5000={9,10})*(SUBTOTAL(3,OFFSET($AK$3,ROW($AK$3:$AK$5000)-MIN(ROW($AK$3:$AK$5000)),,))))/SUBTOTAL(2,$AK$3:$AK$5000)




--


Regards,


Peo Sjoblom
 

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

Similar Threads


Top