+ Reply to Thread
Results 1 to 9 of 9

Help with SUMIFS function

Hybrid View

  1. #1
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Help with SUMIFS function

    You're welcome.

    If you think about how this syntax works
    SUM(SUMIFS(C$2:C$11,A$2:A$11,D2,B$2:B$11,{"apple","banana"}))

    It's essentially doing 2 sumifs formulas (1 for apple, 1 for banana), and summing the results of each.
    A shortcut for
    SUM(SUMIFS(C$2:C$11,A$2:A$11,D2,B$2:B$11,"apple"),SUMIFS(C$2:C$11,A$2:A$11,D2,B$2:B$11,"banana"))


    Similarly, in the initial IF I used this
    SUM(--(COUNTIFS($A$2:$A$11,D2,$B$2:$B$11,{"apple","banana"})>0))
    This is adding the >0 operator to each countifs and returning True or False for them.
    The -- is converting the true/false to 1/0
    Then it's summed.
    Basically doing
    SUM(--(COUNTIFS($A$2:$A$11,D2,$B$2:$B$11,"apple")>0),--(COUNTIFS($A$2:$A$11,D2,$B$2:$B$11,"banana")>0))

    Only if both are true will that sum =2
    If that sum does =2, then do the sum(sumifs

    Hope that helps.
    Last edited by Jonmo1; 09-27-2016 at 01:21 PM.

  2. #2
    Registered User
    Join Date
    06-01-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    20

    Re: Help with SUMIFS function

    Thank you very much for the explanation!

    Of course the operator greater than is what changes the countifs to True or False, it makes perfect sense, and very useful to see how the syntax is working.

    A very clever simple formula and great to see how it is put together, that really helps with my understanding of formulas in excel.

    Thank you again!

  3. #3
    Registered User
    Join Date
    06-01-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    20

    Re: Help with SUMIFS function

    Thank you very much for the explanation!

    Of course the operator greater than is what changes the countifs to True or False, it makes perfect sense, and very useful to see how the syntax is working.

    A very clever simple formula and great to see how it is put together, that really helps with my understanding of formulas in excel.

    Thank you again!

+ 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. [SOLVED] Using large function based on sumifs function
    By jeosen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-26-2015, 08:20 AM
  2. [SOLVED] Help with this SUMIFS function
    By husni in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-09-2015, 01:28 AM
  3. [SOLVED] Sumifs / or function help
    By HATLET in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-03-2014, 11:06 AM
  4. Help nesting an OR function inside a SUMIFS function
    By wes228 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-21-2014, 06:22 PM
  5. [SOLVED] sumifs function
    By orshims in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2014, 10:56 AM
  6. [SOLVED] Sumifs Function
    By madness in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-09-2013, 02:47 PM
  7. [SOLVED] SUMIFS function?
    By jed38 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2012, 04:33 PM

Tags for this Thread

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