View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Count only cells within Filtered Range

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"))

--
Biff
Microsoft Excel MVP


"Corey" wrote in message
...
Do you know what I can do?

"Shane Devenshire" wrote:

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


"Gary''s Student" wrote:

See SUBTOTAL in Excel Help.
--
Gary''s Student - gsnu200829


"Corey" wrote:

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?