Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Hi all,
does anybody know the meaning of "--" in a formula? for example: =IF(SUMPRODUCT(--(B4:B5=B5))=1;1;0) thanks a lot! Massimo |
#2
![]() |
|||
|
|||
![]()
Massimo,
the -- is called a unary minus and used to force a conversion from booleans to numbers. Many array oriented functions work better with numbers than with booleans and the guru's have found it faster than n(). -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam max wrote : Hi all, does anybody know the meaning of "--" in a formula? for example: =IF(SUMPRODUCT(--(B4:B5=B5))=1;1;0) thanks a lot! Massimo |
#3
![]() |
|||
|
|||
![]()
Massimo,
Take a look at http://www.xldynamic.com/source/xld.SUMPRODUCT.html -- HTH RP (remove nothere from the email address if mailing direct) "max" wrote in message ... Hi all, does anybody know the meaning of "--" in a formula? for example: =IF(SUMPRODUCT(--(B4:B5=B5))=1;1;0) thanks a lot! Massimo |
#4
![]() |
|||
|
|||
![]()
max wrote:
Hi all, does anybody know the meaning of "--" in a formula? for example: =IF(SUMPRODUCT(--(B4:B5=B5))=1;1;0) thanks a lot! Massimo Don't be seduced to invoke SumProduct when unnecessary, even costly... The goal of your formula can be achieved with... =IF(COUNTIF(B4:B5,B5)=1;1;0) Even shorter... =(COUNTIF(B4:B5,B5)=1)+0 =--(COUNTIF(B4:B5,B5)=1) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with named formula's | Excel Worksheet Functions | |||
Formulas | Excel Worksheet Functions | |||
How to make Excel run limited number of formulas on a given worksh | Excel Discussion (Misc queries) | |||
Way to make Excel only run certain formulas on a worksheet? | Excel Discussion (Misc queries) | |||
calculating formulas for all workbooks in a folder | Excel Worksheet Functions |