+ Reply to Thread
Results 1 to 4 of 4

What does "--" mean?

  1. #1
    Registered User
    Join Date
    04-05-2009
    Location
    ZG
    MS-Off Ver
    2010
    Posts
    12

    What does "--" mean?

    ... in the formula: =SUMPRODUCT(--(A2:A7>0),--(A2:A7<11)) ?

    http://answers.microsoft.com/en-us/o...9-64b26f137c94

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: What does "--" mean?

    An array function like (A2:A7>0) returns a series of TRUE and FALSE values. If you carry out simple arithmetic on these, like adding zero or multiplying by 1, this will convert those logical values to 1's and 0's, which can then be added together. The double unary minus (--) effectively multiplies the array by -1 twice, and thus coerces the logical TRUE/FALSE values to 1/0.

    Hope this helps.

    Pete

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: What does "--" mean?

    See this...

    http://xldynamic.com/source/xld.SUMPRODUCT.html
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    04-05-2009
    Location
    ZG
    MS-Off Ver
    2010
    Posts
    12

    Re: What does "--" mean?

    Ok. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  2. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  3. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  4. Replies: 5
    Last Post: 06-26-2006, 09:23 PM
  5. Replies: 7
    Last Post: 05-13-2006, 05:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1