Count only cells within Filtered Range

C

Corey

I'm using the 'Countif' function. But I want to limit my range to the cells
in a filtered range. Is this possible?

For example I want in my range, i.e. C13, C15, C18 instead of C13:C18?
 
S

Shane Devenshire

Hi,

If I read the post correctly you want to COUNTIF(C1:C25,"Red") but only for
visable cells, is that correct?

If so, I don't think you can do it with SUBTOTAL
 
C

Corey

Do you know what I can do?

Shane Devenshire said:
Hi,

If I read the post correctly you want to COUNTIF(C1:C25,"Red") but only for
visable cells, is that correct?

If so, I don't think you can do it with SUBTOTAL
--
If this helps, please click the Yes button

Cheers,
Shane Devenshire
 
T

T. Valko

What is the condition that you want to count?

Assuming the full unfiltered range is C13:C18 and you want to do a
COUNTIF(C13:C18,"Red") when the range is filtered:

=SUMPRODUCT(SUBTOTAL(3,OFFSET(C13:C18,ROW(C13:C18)-ROW(C13),0,1)),--(C13:C18="Red"))
 

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