# Thread: count records in filtered list (xl2k)

1. ## count records in filtered list (xl2k)

I need to count the number of records in a filtered list. I think I'm missing something.
A way which works, but is very clunky, is to put a formula like
=AND(H13=TRUE,I13=TRUE,J13=FALSE,K13=TRUE,M13<50)
at the end of each row (in column N in my case) and then use the countif function to count the number of records for which all the criteria are met, in other words, rows for which the AND formula returns the value TRUE.

2. ## Re: count records in filtered list (xl2k)

The builtin SUBTOTALS functions count, average, sum, etc directly the visible items in a filtered list.
=Subtotal(2,A1:A1000)

will count the visible items in A1:A1000.

If you really need a multicondition countif you would have to use an ARRAY function and I would need more information to provide it. Chip Pearson has a primer on them Array Formulas

Steve

3. ## Re: count records in filtered list (xl2k)

Thanks very much, Steve. And that will cope with criteria involving Or and Not much more simply than my brute-force thing.
I'll add SUBTOTAL in all 11 flavours to my list of must-have functions...
Thanks again.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•