+ Reply to Thread
Results 1 to 7 of 7

SUMPRODUCT(SUMIF(....)) where criteria is range of cells with blanks in between

  1. #1
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    SUMPRODUCT(SUMIF(....)) where criteria is range of cells with blanks in between

    Given the table below (A1:C6), how do I use a SUMPRODUCT(SUMIF(...)) to get the correct result where the criteria is

    Product = A (which is cell E2) and
    Unit = Blank, 1, Blank & 2 (cells E4:E7) - Yes...it starts with a blank.

    CURRENTLY I have the formula

    Please Login or Register  to view this content.
    My problem here is the 2nd criteria range where the range has blanks, and SUMIFS takes blanks as 0. Thus SUMS blanks, 1 and 2


    Row/Column A B C D E
    1 Product Unit Amount Criteria
    2 A 1 10 A
    3 A 0 20
    4 A 2 20
    5 A 1 #N/A 1
    6 #N/A 2 20
    7 A 0 30 2

    Solved: I was able to solve this via using an Array Formula of SUMPRODUCT(SUMIFS(......IF(...)))

    Please Login or Register  to view this content.
    However, if you have alternative solution where it doesn't use ARRAY, would like to know as well.
    Attached Files Attached Files
    Last edited by dluhut; 08-23-2018 at 04:36 PM.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,501

    Re: SUMPRODUCT(SUMIF(....)) where criteria is range of cells with blanks in between

    without knowing the results you expect nor the named ranges, is this what you want?
    =SUMPRODUCT(SUMIFS(C2:C7,C2:C7,"<>#N/A",A2:A7,$E$2,B2:B7,{"",1,2}))
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: SUMPRODUCT(SUMIF(....)) where criteria is range of cells with blanks in between

    Hey Sambo...thanks for replying.

    That cells E4:E7 is actually a data validation where user will select the value from the drop down list.

    And the list so far has 10 values, however it'll grow.

    The result will basically be from the criteria that they've chosen....which in this example would be 30 (10 + 20), shown in blue. The ones that are in red does not met the criteria either because Product is not 'A' or Unit is not "1" or "2" and lastly, Amount is #N/A
    Last edited by dluhut; 08-23-2018 at 04:21 PM.

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,501

    Re: SUMPRODUCT(SUMIF(....)) where criteria is range of cells with blanks in between

    Any chance you can upload a small representative sample sheet with your expected results? Working from a snapshot is hard to do.

  5. #5
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: SUMPRODUCT(SUMIF(....)) where criteria is range of cells with blanks in between

    I've uploaded the file

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,501

    Re: SUMPRODUCT(SUMIF(....)) where criteria is range of cells with blanks in between

    you've marked the post as solved, is it solved?
    I won't be on the forum much longer so if you remove the solved tag someone will stop by to help if not me.

  7. #7
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: SUMPRODUCT(SUMIF(....)) where criteria is range of cells with blanks in between

    I sort of solved it with a array formula...I've even edit my original thread and provide the formula that I use to solve it.

    However, if there's a formula that avoids array, and makes it faster to calculate, I'd like to know too =)

+ 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 blanks as a criteria in a SUMIF formula
    By The_Snook in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-18-2016, 08:46 AM
  2. Sumproduct with blanks cells
    By silambarasan.J in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-06-2015, 10:05 AM
  3. Sumif function is summing full range instead of cells matching criteria
    By td3601 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-23-2015, 11:14 PM
  4. [SOLVED] Shorten SUMIF + SUMIF + SUMIF each with same reference range but different criteria???
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-13-2014, 09:25 PM
  5. SUMIF with Criteria as a range of cells.
    By Jefplusf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-03-2014, 08:15 PM
  6. [SOLVED] Sumif/sumproduct with a range as a criteria
    By fukirua in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-05-2013, 07:58 PM
  7. sumproduct of part cells of a range with blanks
    By excelFan in forum Excel General
    Replies: 4
    Last Post: 02-25-2005, 07:06 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