| View previous topic :: View next topic |
| Author |
Message |
panos.ioannidis General User

Joined: 16 Jul 2008 Posts: 10
|
Posted: Tue Jul 29, 2008 2:32 am Post subject: counting numbers |
|
|
I have a column of numbers like this:
17
1
4
7
10
29
4
6
3
2
16
16
25
2
16
What I'd like to do is to count how many numbers there are from 1 to 5, from 6 to 10, from 11 to 16, etc
Can anyone please give me an advice? |
|
| Back to top |
|
 |
richardf OOo Enthusiast

Joined: 10 Oct 2004 Posts: 107
|
Posted: Tue Jul 29, 2008 2:55 am Post subject: |
|
|
The following gives the numbers between 5 and 10:
=COUNTIF($A$1:$A$15;"<=10")-COUNTIF($A$1:$A$15;"<=5")
Likely you could use an AND function, but this works well,
Richard |
|
| Back to top |
|
 |
panos.ioannidis General User

Joined: 16 Jul 2008 Posts: 10
|
Posted: Tue Jul 29, 2008 3:04 am Post subject: |
|
|
| Thanks Richard! |
|
| Back to top |
|
 |
romunov Power User

Joined: 29 Nov 2003 Posts: 55 Location: Slovenia
|
Posted: Mon Feb 23, 2009 6:43 am Post subject: |
|
|
Thank you for the simple solution!
Would it be too much to show us how to do this with AND function? I tried doing this on my own with very limited (no) success. |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Mon Feb 23, 2009 7:05 am Post subject: |
|
|
=SUM(AND(range=this ; other=that)) [Ctrl+Shift+Enter] _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
_wojciechm Newbie

Joined: 27 Feb 2009 Posts: 2
|
Posted: Sat Feb 28, 2009 1:51 am Post subject: |
|
|
| Have you any idea how to do this same with pivot table? |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Sat Feb 28, 2009 2:32 am Post subject: |
|
|
| _wojciechm wrote: | | Have you any idea how to do this same with pivot table? |
First add a column header and select the list.
Data>Pilot>Start...
[More Options]
Specify the output range (the default below the list is nonsense)
Drag the same field of numbers into box "Row Fields" and into box "Data Fields". Double-click "Sum - X" and set "Count" as aggregation.
In the pilot click a row header cell, a cell in the firlst column and call Data>Outline Group (key F12).
Group by interval 5.
The result with column header "X" and the same numbers as in the original posting.
| Code: | X
1-5 6
6-10 3
16-20 4
21-25 1
26-30 1
Total Result 15
|
And then there is function FREQUENCY (see F1-help). _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
_wojciechm Newbie

Joined: 27 Feb 2009 Posts: 2
|
Posted: Sat Feb 28, 2009 12:49 pm Post subject: |
|
|
Thanks a lot!  |
|
| Back to top |
|
 |
|