[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

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?
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
panos.ioannidis
General User

Joined: 16 Jul 2008
Posts: 10

 Posted: Tue Jul 29, 2008 3:04 am    Post subject: Thanks Richard!
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.
Villeroy
Super User

Joined: 04 Oct 2004
Posts: 10106
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 https://forum.openoffice.org
_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?
Villeroy
Super User

Joined: 04 Oct 2004
Posts: 10106
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 https://forum.openoffice.org
_wojciechm
Newbie

Joined: 27 Feb 2009
Posts: 2

 Posted: Sat Feb 28, 2009 12:49 pm    Post subject: Thanks a lot!
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum