Use/purpose/name of --

  • Thread starter Thread starter Dave R.
  • Start date Start date
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.
 
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)
 
Back
Top