View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default =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