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

[SOLVED] Count.ifs

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


Joined: 01 Mar 2011
Posts: 9

PostPosted: Tue Mar 15, 2011 12:15 pm    Post subject: [SOLVED] Count.ifs Reply with quote

How can I count with more than one criteria? Does Calc have cont.ifs function?

Last edited by Marcos.123 on Wed Mar 16, 2011 9:39 am; edited 3 times in total
Back to top
View user's profile Send private message
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 2032
Location: Sydney, Australia

PostPosted: Tue Mar 15, 2011 1:56 pm    Post subject: Reply with quote

Use the SUMPRODUCT function.
For example, to count the rows where A1:A50=D1 and B1:B50=D2...
Code:
=SUMPRODUCT(A1:A50=D1;B1:B50=D2)
or
Code:
=SUMPRODUCT((A1:A50=D1)*(B1:B50=D2))

To count the rows where A1:A50=D1 or B1:B50=D2...
Code:
=SUMPRODUCT((A1:A50=D1)+(B1:B50=D2)-(A1:A50=D1)*(B1:B50=D2))

Edit: Corrected formula for counting the rows where A1:A50=D1 or B1:B50=D2
Ken Johnson
_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).


Last edited by ken johnson on Sat Mar 19, 2011 5:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
Marcos.123
General User
General User


Joined: 01 Mar 2011
Posts: 9

PostPosted: Wed Mar 16, 2011 8:27 am    Post subject: Reply with quote

Sorry, it didn't work. My problem is that the criteria for counting are texts. Like this:

=SUMPRODUCT('Tabela de Pendências'.C4;C65536="Vistoria Prévia"; 'Tabela de Pendências'.D4:D65536="ABC")

And then, Calc. gives the error #NAME?

Thanks for your help!


Last edited by Marcos.123 on Wed Mar 16, 2011 9:27 am; edited 1 time in total
Back to top
View user's profile Send private message
Marcos.123
General User
General User


Joined: 01 Mar 2011
Posts: 9

PostPosted: Wed Mar 16, 2011 9:39 am    Post subject: Reply with quote

Thank you!
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Wed Mar 16, 2011 9:45 am    Post subject: Reply with quote

Quote:
C4;C65536
You used a semicolon instead of a colon.
Back to top
View user's profile Send private message
Marcos.123
General User
General User


Joined: 01 Mar 2011
Posts: 9

PostPosted: Thu Mar 17, 2011 10:29 am    Post subject: Reply with quote

yeah. I saw that when i wrote this hier.
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