countif

  • Thread starter Luc Vandenhoeck
  • Start date
P

Pete_UK

No, but you can use SUMPRODUCT( ... ) or an array-entered
SUM(IF( ... )) to achieve multi-criteria counting. Perhaps if you
could post some details of what you want to do ...

Pete
 
B

Bob I

the "Criteria" have to evaluate to true for the count if to work. Figure
out how to make what "two criteria" you have in mind equal true and you
have the bugger licked.

People here would offer examples IF you provided a sample of your
"criteria" and data.
 
B

Bob Phillips

=SUMPRODUCT(--(rng1="text value"),--(rng2=numeric_value))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
R

Ron Coderre

Let's see if I understand correctly, by way of example:

With
A1:A10 containing this list
Dave
Dave
Steve
Steve
Steve
Bill
Bill
Jane
Jane
Jane

If you want to count the number of cells that
contain either "Dave" OR "Bill" (in this case: 4)

Try this:
B1: =SUM(COUNTIF(A1:A10,{"dave","bill"}))

Alternatively,
B1: Dave
B2: Bill

C1: =SUMPRODUCT(COUNTIF(A1:A10,B1:B2))

Is that what you meant?

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
J

joeu2004

Is it possible to use two criteria with this function?

Not really. But if the two criteria are something like 100<range and
range<=200, the following might work for you:

=countif(range, ">100") - countif(range, ">200")
 
Top