View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Domenic Domenic is offline
external usenet poster
 
Posts: 150
Default COUNTIF and AVERAGE only cells in unhidden rows

In article ,
dford wrote:

This is what I'm trying to do.
=COUNTIF($H$2:$H$599,"=25")-COUNTIF($H$2:$H$599,"30")

However, it counts cells in hidded rows. I want to count cells in only
unhidded rows. The rowa are hidden as a result of a filtered list.


Try...

=SUMPRODUCT(SUBTOTAL(2,OFFSET($H$2:$H$599,ROW($H$2 :$H$599)-ROW($H$2),0,1)
),--($H$2:$H$599=25),--($H$2:$H$599<=30))

Hope this helps!