View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sloth Sloth is offline
external usenet poster
 
Posts: 252
Default COUNTIF on an autofilter?

I'm sorry; I did misunderstand your question.

If you are going to use SUMPRODUCT anyways, why not use only SUMPRODUCT

=SUMPRODUCT(--(1st criteria),--(2nd criteria))

where the first creteria is the one you used to filter the list, and the
second is the one you need to add.

OR....

use the "custom option in the autofilter to select multiple filter options
(up to three). I doubt this would work though, looking at your responses.

"gordo" wrote:

Thanks Sloth,

The SUBTOTAL function will perform a count, but my problem was applying
criteria to the filtered list, not just a total count.

The trick here, as Biff points out, is to nest the SUBTOTAL function inside
the SUMPRODUCT function. There's a few other things in there too, but that's
the general approach.

Thanks-


"Sloth" wrote:

Use SUBTOTAL, as it ignores any hidden rows from filtering. It can do the
following...
1 AVERAGE
2 COUNT
3 COUNTA
4 MAX
5 MIN
6 PRODUCT
7 STDEV
8 STDEVP
9 SUM
10 VAR
11 VARP