ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   =SUMPRODUCT() Question (https://www.excelbanter.com/excel-discussion-misc-queries/198286-%3Dsumproduct-question.html)

Harvey[_2_]

=SUMPRODUCT() Question
 
In the formula =SUMPRODUCT(--(A2:A10=D2),--(B2:B10=E2))
What does the -- mean?

Harvey Mandel



David Biddulph[_2_]

=SUMPRODUCT() Question
 
See your question of 20 minutes or so ago.
--
David Biddulph

"Harvey" wrote in message
...
In the formula =SUMPRODUCT(--(A2:A10=D2),--(B2:B10=E2))
What does the -- mean?

Harvey Mandel




Mike H

=SUMPRODUCT() Question
 
Hi,

If you are looking up numbers in 1 array and text in another you could get
errors. The double minus (double unary) converts every thing to 1's and 0's
and the error is eliminated. To see the effect select this part of the
formula and tap F9

A2:A10=D2

You will see TRUE or False depending on how it evalutes.
Click the red tick after doing this then select this part of the formula and
Tap F9

--(A2:A10=D10)

Note now how True and false have become 1(True) and 0(false)

For a professional explanation have a look here.
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Mike







"Harvey" wrote:

In the formula =SUMPRODUCT(--(A2:A10=D2),--(B2:B10=E2))
What does the -- mean?

Harvey Mandel




Mike H

=SUMPRODUCT() Question
 
Hmmm, missed the previous post and I did of course mean click the red Cross

"Mike H" wrote:

Hi,

If you are looking up numbers in 1 array and text in another you could get
errors. The double minus (double unary) converts every thing to 1's and 0's
and the error is eliminated. To see the effect select this part of the
formula and tap F9

A2:A10=D2

You will see TRUE or False depending on how it evalutes.
Click the red tick after doing this then select this part of the formula and
Tap F9

--(A2:A10=D10)

Note now how True and false have become 1(True) and 0(false)

For a professional explanation have a look here.
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Mike







"Harvey" wrote:

In the formula =SUMPRODUCT(--(A2:A10=D2),--(B2:B10=E2))
What does the -- mean?

Harvey Mandel




Harvey[_2_]

=SUMPRODUCT() Question
 
I cannot find my earlier message which is why I resent. I appreciate all the
answers.
Harvey Mandel
"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
See your question of 20 minutes or so ago.
--
David Biddulph

"Harvey" wrote in message
...
In the formula =SUMPRODUCT(--(A2:A10=D2),--(B2:B10=E2))
What does the -- mean?

Harvey Mandel







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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com