View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Using countif on non-consecutive cells

If you only have a "few" cells to check:

=(A1=1)+(A5=1)+(A7=1)+(A15=1)+(A18=1)

If you have "many" cells to check it depends on the range of numbers that
the cells can contain but you use something like this if the lowest possible
number is the number 1:

=INDEX(FREQUENCY((A1,A5,A7,A15,A18),1),1)

--
Biff
Microsoft Excel MVP


"Marty" wrote in message
...
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