+ Reply to Thread
Results 1 to 3 of 3

What does -- do?

  1. #1
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581

    What does -- do?

    Hi,

    I was wondering what -- does. I'm assuming -- does not mean +. Specifically, I saw one example from Contextures with:
    =SUMPRODUCT(--(ColourList=B15),(UnitsList),--(DateList>=$C$2),--(DateList<=$E$2))

    Although I'm specifically referring to sumproduct, if it has different meanings/usage elsewhere, I'd be interested in knowing about that too. If you know of a website that explains it, that would work fine too. (-- isn't an easy thing to search for)

    Thanks,
    Scott

  2. #2
    Dave Peterson
    Guest

    Re: What does -- do?

    =sumproduct() likes to work with numbers. The -- stuff changes trues and falses
    to 1's and 0's.

    Bob Phillips explains =sumproduct() in much more detail here:
    http://www.xldynamic.com/source/xld.SUMPRODUCT.html

    And J.E. McGimpsey has some notes at:
    http://mcgimpsey.com/excel/formulae/doubleneg.html

    Maistrye wrote:
    >
    > Hi,
    >
    > I was wondering what -- does. I'm assuming -- does not mean +.
    > Specifically, I saw one example from Contextures with:
    >
    > =SUMPRODUCT(--(ColourList=B15),(UnitsList),--(DateList>=$C$2),--(DateList<=$E$2))
    >
    > Although I'm specifically referring to sumproduct, if it has different
    > meanings/usage elsewhere, I'd be interested in knowing about that too.
    > If you know of a website that explains it, that would work fine too.
    > (-- isn't an easy thing to search for)
    >
    > Thanks,
    > Scott
    >
    > --
    > Maistrye
    > ------------------------------------------------------------------------
    > Maistrye's Profile: http://www.excelforum.com/member.php...o&userid=36078
    > View this thread: http://www.excelforum.com/showthread...hreadid=559971


    --

    Dave Peterson

  3. #3
    JMB
    Guest

    RE: What does -- do?

    I've also seen folks use it to convert text date values to numeric for some
    logical comparisons, like

    =I11<(--"4/5/06") -U.S. short date format. Note that the DATE function is
    probably a better choice if your workbook will be used by others.


    "Maistrye" wrote:

    >
    > Hi,
    >
    > I was wondering what -- does. I'm assuming -- does not mean +.
    > Specifically, I saw one example from Contextures with:
    >
    > =SUMPRODUCT(--(ColourList=B15),(UnitsList),--(DateList>=$C$2),--(DateList<=$E$2))
    >
    > Although I'm specifically referring to sumproduct, if it has different
    > meanings/usage elsewhere, I'd be interested in knowing about that too.
    > If you know of a website that explains it, that would work fine too.
    > (-- isn't an easy thing to search for)
    >
    > Thanks,
    > Scott
    >
    >
    > --
    > Maistrye
    > ------------------------------------------------------------------------
    > Maistrye's Profile: http://www.excelforum.com/member.php...o&userid=36078
    > View this thread: http://www.excelforum.com/showthread...hreadid=559971
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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