# How to do a frequency count with criteria?

Posted by KJ on January 27, 2001 10:40 PM

I use the FREQUENCY function frequently, but haven't yet found a way to set criteria. I have datasets with lots of data that fits one of two conditions and I'd like to get frequency counts for each condition. A lot of this is before and after data (eg Child_weight before and after nursing intervention). I'd like to end up with something that looks like a pivot table but counts the number of records between 2 values:
kg, 1, 2
3, 10, 5
6, 20, 25
9, 30, 35
12, 10, 5

Which tells me that before intervention (1) there were 30 children >6kg and &LT;=9kg and afterwards (2) there were 35 in this category.

All bright ideas gratefully accepted

Posted by Jaime on January 28, 2001 5:42 AM

=SUM((\$A\$1:\$A\$50>\$B1)*(\$A\$1:\$A\$50&LT;=\$C1))

This is an array formula. so press ctrl+alt+enter when u input it.

Ur range criteria goes in colmuns B and C. These are values 6 and 9 respectively.

Column A holds the weigths of the children.

Posted by Mark W. on January 28, 2001 8:22 AM

KJ, I'm a big proponent of PivotTables. If you would like to persue a PivotTable solution let me know. I believe we can find a solution.