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)
 

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

Similar Threads

Excel Need Countifs Formula Help 0
Reference & Duplicate Data Help 2
using if function..please help 2
mr t.valko ..help 8
IF AND OR STATEMENT 3
Excel Copy COUNTIF while retaining reference 7
Text to rows 4
Removing Duplicates Help 6

Back
Top