help me with "countif" & "and" function.........

  • Thread starter Thread starter Rosso Jose Serrano
  • Start date Start date
R

Rosso Jose Serrano

i've columns :

| A | B |
------------------------
1 | book | red |
------------------------
2 | book | blue |
------------------------
3 | book | red |
------------------------

what's the formula to count how many "red book" in the columns?

i've tried in a cell :
=countif((a1:a3,"book") and (b1:b3,"red"))
but it didn't work....


please help me..


tx,

rj serrano
 
Rosso,

Try

=SUMPRODUCT((A1:A10="book")*(B1:B10="red"))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Rosso,

Other comment on your own (unsuccessful) trial : the and
function works but you have to define it different.

Try this. I'm not sure if it works in this CountIF
context though ...
=countif(AND((a1:a3,"book"),(b1:b3,"red")))
 
Philip,

That doesn't work. You can't use AND in COUNTIF.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top