View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default COUNTIF a value within a range equals any value in an array/li

"sweens319" wrote...
Now, say I'm using the first function

=SUMPRODUCT(COUNTIF(ID,Sheet2!C1:C100))

The next column over is a number (elapsed time). How would I change this
and add to it if I want to count all the occurrences of My Site User ID's
that have an elapsed time of 180?

....

If none of your user IDs would be blank, you could change this to the array
formula

=SUM(COUNTIF(ID,IF(Sheet2!D1:D100180,Sheet2!C1:C1 00,"")))

or adapt the other array formula

=COUNT(MATCH(Sheet2!C1:C100,ID,0)/(Sheet2!D1:D100180))