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

Conditional Summing

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


Joined: 11 Apr 2007
Posts: 6

PostPosted: Mon Jun 11, 2007 6:42 am    Post subject: Conditional Summing Reply with quote

Another rookie question here,

I need to sum all the money totals in a row that also have 'Y' in the cell below to say that they've been paid. What's the formula for this?

Thanks to all those experienced Calc users that make this forum work so well, I hope to start giving back once I know what I'm doing.

Dan Smile
Back to top
View user's profile Send private message Visit poster's website
squenson
Super User
Super User


Joined: 09 Mar 2007
Posts: 690
Location: Nis, Serbia

PostPosted: Mon Jun 11, 2007 9:12 am    Post subject: Reply with quote

danradice,

Assuming that the range of amounts is in cells D2:O2, and the "Y" are just below, the formula is:
Code:
=SUMPRODUCT(D2:O2="Y";D1:O1)


SUMPRODUCT is a powerful function that multiplies all the arguments of arrays of same length, then makes the sum of the result of all these multiplications. The trick in the forula above is to use a condition that has a value of 1 if TRUE, or 0 if FALSE. Therefore, it will multiplies all these 0's or 1's with the corresponding amount, and make the sum you need.
_________________
Help us to help you: Add [Solved] to the title of the thread if you agree with the answer
>>> Do you know the new OOo support forum http://user.services.openoffice.org/en/forum/index.php? <<<
Back to top
View user's profile Send private message
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Mon Jun 11, 2007 9:24 am    Post subject: Reply with quote

"I hope to start giving back once I know what I'm doing. "

A word of advice: Start sooner. I have been doing it for a while and still don't know what I'm doing.

David.
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