Microsoft Excel Help - countif and filters

Soldato
Joined
7 Feb 2004
Posts
8,215
Location
North East
Can anyone help me with this ?

Im using the countif function to count 4 different phrases, say a, b, c, d.

I have a summary at the top, using countif "a" countif "b" etc

a - 5
b - 3
c - 6
d - 7
Total - 21

I then use the autofilter on the column these relate to to show only, say, b and c

I want the countif to then say only what is showing

a - 0
b - 3
c - 6
d - 0
Total - 9

Any ideas, or am I going about this the wrong way ? I also need to filter by other columns, but still only count that aforementioned.

Hopefully this makes sense, if not, please ask, as Im completely baffled :(

Ive tried other methods, the closest I can get is to count all lines filtered, however I need to show each category, rather than total.
 
Can anyone help me with this ?

Im using the countif function to count 4 different phrases, say a, b, c, d.

I have a summary at the top, using countif "a" countif "b" etc

a - 5
b - 3
c - 6
d - 7
Total - 21

I then use the autofilter on the column these relate to to show only, say, b and c

I want the countif to then say only what is showing

a - 0
b - 3
c - 6
d - 0
Total - 9

Any ideas, or am I going about this the wrong way ? I also need to filter by other columns, but still only count that aforementioned.

Hopefully this makes sense, if not, please ask, as Im completely baffled :(

Ive tried other methods, the closest I can get is to count all lines filtered, however I need to show each category, rather than total.

easiest way is to use a pivot table rather than hard coding a summary table, otherwise you could do it rudimentary using a few clever SUBTOTAL or VBA if you're sad like me, but pivot is easiest.
 
Back
Top Bottom