#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default Too many 'if's!

You were correct in your assumption that PRODUCT had something to do with
multiplication, SUMPRODUCT actually means "the SUM of the PRODUCTS". Usually
this is done for a matrix of values.

But when used in this manner it works by looking at each row individually
and returning the SUM of the PRODUCT, but the PRODUCT is made up of values
from one row. The logical tests return either -1 (true) or 0 (false). So
any false statement will cause the result of the multiplication to be zero.
Otherwise the result of -1 * -1 = 1 and then multiplied by the amount = the
amount.

You may see similar use of SUMPRODUCT written as:
SUMPRODUCT(--(C4:C21="Yes"),--(D4:D21="Petty Cash"),--(B4:B21))
where the double-negative 'coerces' the TRUE/FALSE results to a numeric
value and the comma (,) acts as the * operator since parameters within a
SUMPRODUCT() are multiplied together.



"Ben Mehling" wrote:

Yes! That's exactly what I needed to accomplish! I never considered that
because I saw 'product' in the term and assumed it had something to do with
multiplying, not adding. Not going to pretend to understand why this works,
but it does and I'm happy. Thanks a bunch!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Too Many If's Rianne Excel Worksheet Functions 10 March 22nd 07 08:13 PM
IF's karensa Excel Worksheet Functions 4 December 27th 06 10:05 PM
How many 'if's'? Lynneth Excel Discussion (Misc queries) 1 May 4th 06 03:59 PM
to many 'IF's'?? boufant Excel Worksheet Functions 4 July 2nd 05 10:58 AM
How many if's? Christopher Anderson Excel Discussion (Misc queries) 4 January 5th 05 03:16 PM


All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"