Total number of Occurances

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

How do I count the number of occurances (apples and/or
Organges) within range of cells (B2:B200) for multi vales.

Thanks for your help
 
Bill,

=COUNTIF(B2:B200,"apples")

counts the instances of apples

=SUMPRODUCT((B2:B200="apples")+(B2:B200="oranges"))

counts the instances of apples and oranges

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
You could also use:

=COUNTIF(B2:B200,"apples")+COUNTIF(B2:B200,"oranges")

Good Luck,
Mark Graesser
(e-mail address removed)

----- Bob Phillips wrote: -----

Bill,

=COUNTIF(B2:B200,"apples")

counts the instances of apples

=SUMPRODUCT((B2:B200="apples")+(B2:B200="oranges"))

counts the instances of apples and oranges

--

HTH

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

You are right, and I think you should, it's less obtuse <vbg>

--

HTH

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