Sandeep,

The -- is used as an unary operator to convert a boolean value ie,
TRUE/FALSE in to 1/0. Sumproduct for example does not evaluate non-numeric
values that results in a formula like the boolean results in the array
equation A1:A10="Sandeep".

So to negate this, we use unary operator -- with TRUE or FALSE to give 1 or
0

We can also use ++

In fact you can also use a multiplier or a divisor of 1

In case you'd like more information, look up in google. Here's something
from an Excel MVP

http://www.mcgimpsey.com/excel/formulae/doubleneg.html

Regards,

Sam Mathai Chacko
On Sat, Dec 3, 2011 at 10:50 AM, <chhajersand...@gmail.com> wrote:

> Dear Excel gurus,
>
> I have noticed that many time you all use -- in a formula. Why is it been
> used and when it should be used?
>
> Sandeep Kumar Chhajer.
> Sent on my BlackBerry® from Vodafone
>
> --
> FORUM RULES (934+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5)  Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE  : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> ------------------------------------------------------------------------------------------------------
> To post to this group, send email to excel-macros@googlegroups.com
>



-- 
Sam Mathai Chacko

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Reply via email to