COUNTIF Function on filtered data

  • Thread starter Thread starter TG
  • Start date Start date
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?
 
=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)
 
Back
Top