COUNTIF Function on filtered data


T

TG

I want to be able to filter data (using criteria in Col A) and then count
numbers (in another column) that are greater than or less than a certain
number. I only want to count the numbers from the filtered area, not from
the whole range of data. I want this to be dynamic, so that when I change
filters in Col A it still only counts numbers from the filtered data.

The COUNTIF function counts numbers from the whole range and the SUBTOTAL
function doesn't have a reference number for the COUNTIF function.

Is there a way to do this?
 
Ad

Advertisements

B

Bob Phillips

=SUMPRODUCT(SUBTOTAL(3,OFFSET(A1,ROW($A$2:$A$19)-ROW($A$1),,1)),--($C$2:$C$19>20)),--($C$2:$C$19<=50))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Ad

Advertisements

T

TG

thank you so much Bob - I've been working on this for hours, that's so
amazingly helpful!!!
 

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