COUNTIF with various criteria

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

Guest

I am using the following formulat to get the number of Boys from London
between the ages of 5 and 12.

=SUMPRODUCT(--($D$3:$D$986="B"),--($F$3:$F$986=5>12),--($H$3:$H$986="London"))

I must have done something wrong because I am not getting anything that
makes sense.

Can someone help please?

Thank you
 
Try this:
=SUMPRODUCT(--($D$3:$D$986="B"),--($F$3:$F$986>=5),--($F$3:$F$986<=12),--($H$3:$H$986="London"))

Does that help?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
 
Well, for one thing, this portion makes no sense: --($F$3:$F$986=5>12)

Those values that are equal to 5 are by definition not greater than
12. What are you trying to do with that?

Dave
 
I tried the formula. It is giving me the correct answer. Are you sure you
entered it properly?
 
I did a cut and paste. When doing the total for boys and girls I still end
up with a total greater than I expect.
 
Back
Top