Help Using a countif with multiple criteria but not counting filtered rows

Copper Contributor

I am using this formula:

=COUNTIF(P18:P66,"C - ROR")+COUNTIF(P18:P66,"C - Letter")+COUNTIF(P18:P66,"C - Letter & Verbal")+COUNTIF(P18:P66,"C - NA for claimants ")

 

If I filter or hide rows I do not want to count it.  I am at a loss of what to do. What formula would you use to not count the hidden or sorted data?

 

2 Replies

@Kboswell73 

 

Use this formula:

 

=SUM(SUMPRODUCT((P18:P66={"C - ROR","C - Letter","C - Letter & Verbal","C - NA for claimants"})*(SUBTOTAL(103,OFFSET(P18,ROW(P18:P66)-ROW(P18),0,1)))))

 

See Count visible rows only with criteria for background on this formula.