Count If - please help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Guest
Hallo
I am trying to do a count if - possible array formula for the following

In cells B2:b10 there are names of people
In cells C2:c10 there are ages 1 to 5

I want to count the number of people whose name is "Ben" and their age is great than 10

i tried {=count(if(b2:b10="Ben",if(c2:c10>10,c2:c10,0),0))}
but it doesn't seem to be working

Thanks
Pete
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Put in D2 =B2&C2 and then drag fill down

Then use that range

=COUNTIF(D2:D10,"Ben10")
 
Upvote 0
Hi

The DCOUNT or DCOUNTA is ideal for this and better than an array formula in many ways.

Let's say you have the headings "Names" and "Ages", copy these to say cells D1:E1 in D2 put "Ben" and in E2 put 10

=DCOUNTA(A1:B500,"Names",D1:E2)

To see some more uses of these functions you can download some examples here:

http://www.ozgrid.com/download/default.htm
under DFunctionsWithValidation.zip
 
Upvote 0
On 2002-03-03 21:35, Anonymous wrote:
Hallo, I am trying to do a count if - possible array formula for the following
In cells B2:b10 there are names of people
In cells C2:c10 there are ages 1 to 5
I want to count the number of people whose name is "Ben" and their age is great than 10
I tried {=count(if(b2:b10="Ben",if(c2:c10>10,c2:c10,0),0))} but it doesn't seem to be working.
Thanks, Pete.
Maybe, this is easier:
=SUMPRODUCT((B2:B10="Ben")*(C2:C10>10))
 
Upvote 0

Forum statistics

Threads
1,223,365
Messages
6,171,656
Members
452,415
Latest member
mansoorali

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top