View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default COUNTIF a value within a range equals any value in an array/li

It doesn't matter, ISNUMBER in this formula has nothing to do with the
contents of the cells


--


Regards,


Peo Sjoblom



"sweens319" wrote in message
...
Awesome! That works for the number column, but what if I have a text
column,
like in my other post?

A B
XYZ Yes
XYZ No
ABC No
LMN Yes
ABC Yes
LMN No

I tried ISTEXT with Sheet2!$D1:D100="Yes"
but that returns a zero.


"Roger Govier" wrote:

Hi
You could go back to Biff's original formula, and add another condition.

=SUMPRODUCT(--(ISNUMBER(MATCH(Sheet2!C1:C100,ID,0))),
--(Sheet2!$D1:D100180))

assuming your elapsed times are in column D
--
Regards
Roger Govier



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

"Harlan Grove" wrote:

"T. Valko" wrote...
Try this:

=SUMPRODUCT(--(ISNUMBER(MATCH(Sheet2!C1:C100,ID,0))))
....

If recalc speed isn't essential,

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

should return the same result. If recalc speed is essential, I believe
the
array formula

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

would be faster.