Use/purpose/name of --

D

Dave R.

Hi all, can someone explain or point to an explanation of using -- in
formulas?

I looked in excel help, and tried unsuccessfully to google search for an
answer.
 
P

Paul

Dave R. said:
Hi all, can someone explain or point to an explanation of using -- in
formulas?

I looked in excel help, and tried unsuccessfully to google search for an
answer.

I assume you mean like this:
=SUMPRODUCT(--(A1:A10="q"),B1:B10)

It is simply a double minus sign. It's purpose is to force Excel to turn the
binary values (TRUE and FALSE) into numbers (1 and 0).

An alternative, using the above example, is
=SUMPRODUCT(1*(A1:A10="q"),B1:B10)
 

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