+ Reply to Thread
Results 1 to 7 of 7

=SUMPRODUCT formula problems

  1. #1
    Registered User
    Join Date
    09-30-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2010
    Posts
    81

    =SUMPRODUCT formula problems

    I'm trying to write an array formula which searches a column on one sheet for a value in a cell of another sheet, and provides a sum total of the results. The search values are picked from combo boxes.

    So far, I have this:

    Please Login or Register  to view this content.
    This formula is not working, and I have a feeling I am missing something important; can anyone see what I'm doing wrong just by looking at what I have so far? I have attached a sample workbook to show what I am trying to do.

    My many thanks for any help anyone can offer!
    Nate
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: =SUMPRODUCT formula problems

    By inspection, it is not too clear what you are even trying to do with this formula based on your example. Try this formula in C12 on the example workbook you posted. Is this the expected result?

    Please Login or Register  to view this content.
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: =SUMPRODUCT formula problems

    Hi Nate,

    I'd suggest you use a Pivot Table instead of trying to build these formulas. I also think you want a CountIFS () instead of SumProduct. See the attached.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    09-30-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: =SUMPRODUCT formula problems

    Quote Originally Posted by mcmahobt View Post
    By inspection, it is not too clear what you are even trying to do with this formula based on your example.
    My apologies, I had entered the formula from my actual workbook, and then attached a sample which was different.

    Quote Originally Posted by mcmahobt View Post
    Try this formula in C12 on the example workbook you posted. Is this the expected result?

    Please Login or Register  to view this content.
    This definitely does what I am trying to do. I noticed that if I adjust the formula to try to locate the index in a range of columns, it stops working. So, for instance:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    ...does not work, because the second condition is now searching D1 through E50; the formula returns a VALUE error. For clarity, I would like to search for the index value in either column D or E in the example above.

    Is there a way to successfully search on two columns using this formula? This should be an "OR" statement, not an "AND". It's puzzling, because I thought I had it working yesterday to search on two columns, but now I cannot figure what is incorrect.

    Thank you for your help with this!

  5. #5
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: =SUMPRODUCT formula problems

    I'm confused then as to what the need for dropdown selections are. Are you trying to have the table show only values that are associated with the dropdown selections? Or do you want all the values shown on the table simultaneously?

    I attached a workbook that takes a stab at it. SUMPRODUCT can work in this instance, but if your actual database is larger, COUNTIFS is better at handling big data.
    Attached Files Attached Files
    Last edited by mcmahobt; 03-26-2015 at 01:05 PM.

  6. #6
    Registered User
    Join Date
    09-30-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: =SUMPRODUCT formula problems

    Thank you! This definitely gets closer to what I'm looking for.

    The idea of the dropdowns is to delimit the results in the table by parameters that aren't shown in the table. So, for example, if I set the 'Season' to Winter 2015, and Quality to 'Good', the table below shows the totals for how many oranges, apples, and pears that fit those parameters were sold at farmstands, and also how many were sold in produce isles. (It's worth noting that my actual workbook has dozens of parameter drop-downs!)

    Your formula definitely does the trick!

    One further adjustment: how would I alter the formula to ignore a blank cell in the delimiting drop-downs? ( For example, if I want to only see the table set for 'Winter 2015', but the 'Quality' delimiter doesn't matter.) I really appreciate the help with these questions!

  7. #7
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: =SUMPRODUCT formula problems

    To ignore blanks in dropdowns, your source data must not have blanks. If you're not hard coding in the values directly (mainly because of several choices), many people opt to creating a separate worksheet dedicated to dropdown settings that you can then hide. Those, plus VBA, are some options.

+ 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] Problems with sumproduct formula
    By a2424 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-11-2014, 06:58 AM
  2. Problems with a SUMPRODUCT formula
    By Excel808 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-20-2013, 11:17 PM
  3. sumproduct formula problems
    By fabrecass in forum Excel General
    Replies: 17
    Last Post: 02-23-2012, 12:08 PM
  4. Problems with SUMPRODUCT
    By damanjens in forum Excel General
    Replies: 2
    Last Post: 06-14-2010, 12:38 AM
  5. Sumproduct problems with #N/A
    By EdMac in forum Excel General
    Replies: 12
    Last Post: 01-24-2007, 11:27 AM

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