View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default countif only visible cells (filtered)

You must have pasted it incorrectly or gotten excessive characters or too
few

=SUMPRODUCT(--($I$2:$I$200="Y"),--(SUBTOTAL(3,OFFSET($I$2,ROW($I$2:$I$200)-MIN(ROW($I$2:$I$200)),,))))



If you have to, do type in the formula. It works, I promise.

You do want to count Y ? If you want to just count visible cells just use

=SUBTOTAL(3,I2:I200)

my formula will count Y in the filtered range (or unfiltered for that
matter)



--
Regards,

Peo Sjoblom



wrote in message
ups.com...
I am filtering on criteria in column C. The counts are coming from
column I.

I cut and pasted your formula below, but it's not working - the result
is #NAME?



If somehow you are filtering another column and you want count the Y you
can use this technique

=SUMPRODUCT(--($I$2:$I$200="Y"),--(SUBTOTAL(3,OFFSET($I$2,ROW($I$2:$I$200)-*MIN(ROW($I$2:$I$200)),,))))



I have several custom views set to view various filtered populations of
this group of people (different affiliations - in column C if it
matters).