Using "AND" in a COUNTIF function - Excel 97

L

LIZ

I'm trying to enter 3 ranges with 3 different ranges into
a countif - but can get it to work. Not really sure of
the layout. e.g.

=countif(and
(range&criteria1,range&criteria2,range&criteria3)) - but
it wont work - any ideas?
 
K

Kelly

You can't use AND or OR with COUNTIF. Try:
Sum(if(range&criteria, if(range&criteria,
range&criteria,1,0))) With this formula, if the criteria
is met, the cell is given a value of 1, if not, a value of
0. The function then adds up all of the 1s creating a
count. I hope that makes sense.
 
P

Peo Sjoblom

Try

=SUMPRODUCT((range={"criteria1","criteria2","criteria3"})+0)

for text

if the criteria would be numeric you have to remove the quotations

=SUMPRODUCT((range={1,2,3})+0)

If it would be greater than and less than

=SUMPRODUCT((range>=2)*(range<=10))

count numbers greater than or equal to 2 and less than or equal to 10
 
I

immanuel

Yet another method (array-entered):

{=SUM(IF((range=criteria1)*(range=criteria2)*(range=criteria3),1,0))}

/i.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top