OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

counting numbers

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
panos.ioannidis
General User
General User


Joined: 16 Jul 2008
Posts: 10

PostPosted: Tue Jul 29, 2008 2:32 am    Post subject: counting numbers Reply with quote

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
View user's profile Send private message MSN Messenger
richardf
OOo Enthusiast
OOo Enthusiast


Joined: 10 Oct 2004
Posts: 107

PostPosted: Tue Jul 29, 2008 2:55 am    Post subject: Reply with quote

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
View user's profile Send private message
panos.ioannidis
General User
General User


Joined: 16 Jul 2008
Posts: 10

PostPosted: Tue Jul 29, 2008 3:04 am    Post subject: Reply with quote

Thanks Richard!
Back to top
View user's profile Send private message MSN Messenger
romunov
Power User
Power User


Joined: 29 Nov 2003
Posts: 55
Location: Slovenia

PostPosted: Mon Feb 23, 2009 6:43 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Mon Feb 23, 2009 7:05 am    Post subject: Reply with quote

=SUM(AND(range=this ; other=that)) [Ctrl+Shift+Enter]
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
_wojciechm
Newbie
Newbie


Joined: 27 Feb 2009
Posts: 2

PostPosted: Sat Feb 28, 2009 1:51 am    Post subject: Reply with quote

Have you any idea how to do this same with pivot table?
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Sat Feb 28, 2009 2:32 am    Post subject: Reply with quote

_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
Back to top
View user's profile Send private message
_wojciechm
Newbie
Newbie


Joined: 27 Feb 2009
Posts: 2

PostPosted: Sat Feb 28, 2009 12:49 pm    Post subject: Reply with quote

Thanks a lot! Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group