Documentation/How Tos/Calc: FREQUENCY function
From Apache OpenOffice Wiki
< Documentation | How Tos
CALC FUNCTIONS
Contents
FREQUENCY
Returns an array, categorising values of a data set into given intervals.
Syntax:
FREQUENCY(data; bins)
- data is a range or array containing numerical data.
- bins is a single column range or array containing numbers in ascending order which are the upper limit of each category.
- FREQUENCY returns a single column array, where the first element is the count of values in data that are less than or equal to the first value in bins, the second value is the count of values in data that are greater than the first value but less than or equal to the second value in bins, and so on. The array returned is one element longer than bins; the last element contains the count of values in data that are greater than the last value in bins.
- To return an array, FREQUENCY must be entered as an array formula by pressing Cntrl-Shift-Enter instead of the Enter button (or by ticking the Array checkbox if you are using the Formula Wizard).
Example:
=FREQUENCY(A1:A11; B1:B5)
- when entered as an array formula, where the data values in A1:A11 are 12,8,24,11,5,20,16,9,7,16,33 and the values in B1:B5 are 5,10,15,20,25 returns {1|3|2|3|1|1}. The first value is the count of data values less than or equal to 5, and the last value is the count of data values greater than 25.