PS....
I wrote:
If any of B54:B62 is text
Obvious typo; should be B54:B61.
If any of B54:B62 is text, SUMPRODUCT(...*B54:B61)
will fail with a #VALUE error, whereas SUMPRODUCT(...,B54:B61) will not.
So I would write:
SUMPRODUCT((A54:A61="Orange")*(C54:C61="Friday")*( D54
61="Sam"),B54:B61)
This avoids "--", which is superfluous in the case, but it separates B54:B61
to avoid any #VALUE error.
----- original message -----
"JoeU2004" wrote in message
...
"hardeep.kanwar" wrote:
What is the Difference Between "--" in First Function and "*" in
Second Function
1st:SUMPRODUCT(--(A54:A61="Orange"),--(C54:C61="Friday"),--(D5461="Sam"),B54:B61)
2nd:SUMPRODUCT((A54:A61="Orange")*(C54:C61="Friday ")*(D5461="Sam")*B54:B61))
There is no logical difference. "--" (double-negation) is merely a way to
convert boolean results (TRUE, FALSE) into a number, which SUMPRODUCT
requires. But any arithmetic operation will do the same. Moreover,
SUMPRODUCT(x,y,z) is logically the same as SUMPRODUCT(x*y*z).
However, there is an operational difference that may or may not matter,
depending on the situation. If any of B54:B62 is text,
SUMPRODUCT(...*B54:B61) will fail with a #VALUE error, whereas
SUMPRODUCT(...,B54:B61) will not. The reason is that SUMPRODUCT is
designed to tolerate text, whereas arithmetic expressions do not.
----- original message -----
"hardeep.kanwar" wrote in message
...
Hi! Experts
What is the Difference Between these Sumproduct Function
It show the Same Results
What is the Difference Between "--" in First Function and "*" in
Second Function
1st:SUMPRODUCT(--(A54:A61="Orange"),--(C54:C61="Friday"),--(D5461="Sam"),B54:B61)
2nd:SUMPRODUCT((A54:A61="Orange")*(C54:C61="Friday ")*(D5461="Sam")*B54:B61))
Thanks in Advance
Hardeep Kanwar
--
hardeep.kanwar
------------------------------------------------------------------------
hardeep.kanwar's Profile:
http://www.thecodecage.com/forumz/member.php?userid=170
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=106459