View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Teethless mama Teethless mama is offline
external usenet poster
 
Posts: 3,718
Default Using countif on non-consecutive cells

=SUM(COUNTIF(INDIRECT({"A1:A5","A7","A15:A18"}),1) )


"Marty" wrote:

How do I use the countif on non-concecutive cells, i.e. I want to know the
number of certain cells in worksheet that contain a specific value. For
instance, how many cells in a1:a5, a7, a15:a18 contain the value of 1.
--
Marty