Multiple conditions in a COUNTIF function

  • Thread starter Thread starter Shannon
  • Start date Start date
S

Shannon

I'm trying to figure out a way to phrase a countif
function so that it meets two criteria in order to count
an occurrence. For instance, I want every occurrence of a
specific number in column A AND another specific number in
column B to count. See below:

I want it to count all occurrences of (A=200 AND B=1)
which should return "2":

A B
100 1
200 2
100 2
200 1
200 1

Anyone know a way I can do this?
 
Shannon,

Try the SUMPRODUCT variation of COUNTIF<vbg>

=SUMPRODUCT((A1:A100=200)*(B1:B100=1))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Have you tried searching google groups for this question? It comes up
frequently and is not done with COUNTIF, it's done with

=sumproduct((a1:a10=100)*(b1:b10=1))

might try searching first next time.
 

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

Countif and Right functions 8
Multiple count if 2
Excel Need Countifs Formula Help 0
Countif Formulas 2
Count Instances of value in two columns 2
Countif - extended functionality 6
Countif 2
countif 2

Back
Top