PDA

View Full Version : count formula with condition



choco8
2012-03-11, 04:08 AM
i need some help. any can give formula of counta function that can count values.
For examples, data 1,2,4,6,8,9,10,3,4,2,3,1,. i want to count how many are in-
a) are 8 to 10
b) 4 to 7
c) below 3.

thanks for your help.

maninweb
2012-03-11, 12:12 PM
Hi choco8...

you can try following formulas, if the values are in cells A1 to A12...

a) =SUMPRODUCT((A1:A12>=8)*(A1:A12<=10))
b) =SUMMENPRODUKT((A1:A12>=4)*(A1:A12<=7))
c) =COUNTIF(A1:A12,"<3")

Regards :-)

Bob Phillips
2012-03-11, 06:34 PM
If you have Excel 2007 or 2010, use COUNTIFS

=COUNTIFS(A1:A12,">=8",A1:A12,"<=10")

If not then

=COUNTIF(A1:A12,">=8")-COUNTIF(A1:A12,">10")