PDA

View Full Version : [SOLVED] -- (Double Unary)



Romulo Avila
10-11-2017, 01:06 PM
Good afternoon,

I was researching a formula that returns me to the count when column A is smaller than B, the formula below answered, but I do not know what the "-" in the formula is, could anyone take this doubt?
This kind of SOMA had not yet seen.


{=SUM(--(A1:A9<B1:B9))}

mdmackillop
10-11-2017, 03:47 PM
-- (Double unary) forces True/False results into numerical 1/0
Try in next column =A1>B1 and add results and also =--(A1>B1) or =(A1>B1)*1
You could also use {=SUM(1*(A1:A9<B1:B9))}

see 3.3 here (http://www.vbaexpress.com/forum/showthread.php?26676-SUMPRODUCT-Step-By-Step-Part-3&p=184898&viewfull=1#post184898) for its use in SUMPRODUCT

Romulo Avila
10-12-2017, 05:12 AM
Good Morning,


Understood, thank you for the explanation.