Countif

S

seibes

I was wondering if there is a way to use countif or something similar
to count only visible cells. I know of subtotal but to the best of my
knowledge there is no countif function tied to subtotal. Basically i
have a column with a yes, no, and an n/a; I need to count how many of
those there are when they are unfiltered and when they are filtered by
other columns in my spreadsheet. Thanks.
 
J

JE McGimpsey

seibes said:
I was wondering if there is a way to use countif or something similar
to count only visible cells. I know of subtotal but to the best of my
knowledge there is no countif function tied to subtotal. Basically i
have a column with a yes, no, and an n/a; I need to count how many of
those there are when they are unfiltered and when they are filtered by
other columns in my spreadsheet. Thanks.

One way:

=SUMPRODUCT(--(rng="yes"),SUBTOTAL(3, OFFSET(rng, ROW(rng) -
MIN(ROW(rng)),,1)))
 

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