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.
 
Back
Top