+ Reply to Thread
Results 1 to 3 of 3

Sumifs

  1. #1
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    884

    Sumifs

    Hi All,

    I have used the following formula in one of my spreadsheets, now i know it works, but i dont quite understand how or why.

    =SUMPRODUCT(--(Record!$E:$E=$Y$3),--(Record!$L:$L=$U2),Record!$AK:$AK)

    Record!$E$E:$E$E=$Y$3 & Record!$L:$L=$U2),Record!$AK:$AK)
    i understand as they are the sheet page ref's and the ranges, but what on earth are the (--( for??

    Thanks
    Last edited by Paul; 11-18-2011 at 03:34 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Can you explain a SUMIFS??

    galvinpaddy,

    Record!$E$E:$E$E=$Y$3 is a logical test that returns boolean values TRUE or FALSE. In order for the SumProduct formula to use that information, it has to be converted into numbers. Namely 1 for TRUE and 0 for FALSE. This is why the -- is there. It can be read as "minus negative" to return a numeric value.

    You'll notice that if you input into a cell =--TRUE the cell will show as 1 and =--FALSE will show as 0. That's because Excel interprets those boolean values to the desired outcome. If you tried =--"A" you would get an error.

    The same results could be achieved with 1* or 0+, but -- looks a little better and keeps the components of the sumproduct formula clearly separated so it has kind of become the norm.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    884

    Re: Sumifs

    please mark as solved
    Thankyou

+ 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