[Solved] Counting number of values within a given range
[Solved] Counting number of values within a given range
I'm sure this must have been explained, but I haven't been able to locate the answer. I have a column of numbers (hundreds of entries in a single column) for which I'd like to count up how many fall within a numeric range (e.g. between 15 and 30). I've tried COUNTIF a number of ways, but I can't figure out how to do the criteria to establish the range within which the number must fall to be counted. I'd love a pointer to a solution. Thanks!
Last edited by Hagar Delest on Fri Nov 24, 2017 9:22 am, edited 1 time in total.
Reason: tagged solved
Reason: tagged solved
OpenOffice 4.1.3 on Win7
Re: Counting number of values within a given range
Use the (currently undocumented) COUNTIFS function.
By getting to the first bracket for the function entered into a cell, you should see a balloon indicating how the rest of the parameters need to be entered.
It is similar, but not the same, as the COUNTIF function.
Alternatively, the SUMPRODUCT function can also work in this manner.
By getting to the first bracket for the function entered into a cell, you should see a balloon indicating how the rest of the parameters need to be entered.
It is similar, but not the same, as the COUNTIF function.
Alternatively, the SUMPRODUCT function can also work in this manner.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Re: Counting number of values within a given range
When the numbers are in the column A, then the COUNTIFS() mathematically equals to:
or:
Maybe you need use "<=" and/or ">=" relations.
Code: Select all
=COUNT(A1:A400)-COUNTIF(A1:A400;"<15")-COUNTIF(A1:A400;">30")
Code: Select all
=COUNTIF(A1:A400;">=15")-COUNTIF(A1:A400;">30")
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: [SOLVED] Counting number of values within a given range
I'll take a look at the COUNTIFS() function and see how to employ it. I appreciate that new tool. Thanks as well for the mathematically obvious formula (that I overlooked) from Zizi64. Excluding the numbers above the top value in the range is the same as counting just the numbers between. Excellent! The simplest answers are sometimes the best. Works great - thanks, guys!
Last edited by RGB3D on Wed Nov 15, 2017 10:55 pm, edited 1 time in total.
OpenOffice 4.1.3 on Win7
Re: Counting number of values within a given range
Works great - thanks! (Now how do I mark this solved?)
OpenOffice 4.1.3 on Win7
Re: Counting number of values within a given range
Please edit your first post. Add the [Solved] string to the begining of the Title of this topic.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.