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

Author Message
General User

Joined: 11 Apr 2007
Posts: 6

 Posted: Mon Jun 11, 2007 6:42 am    Post subject: Conditional Summing 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
squenson
Super User

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

Posted: Mon Jun 11, 2007 9:12 am    Post subject:

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.
_________________
>>> Do you know the new OOo support forum http://user.services.openoffice.org/en/forum/index.php? <<<
David
Super User

Joined: 24 Oct 2003
Posts: 5668

 Posted: Mon Jun 11, 2007 9:24 am    Post subject: "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.
 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