=SUMPRODUCT() Question

H

Harvey

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

Harvey Mandel
 
M

Mike H

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
 
H

Harvey

I cannot find my earlier message which is why I resent. I appreciate all the
answers.
Harvey Mandel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top