+ Reply to Thread
Results 1 to 4 of 4

Trouble getting a conditional Sumproduct formula to work

  1. #1
    Registered User
    Join Date
    09-14-2018
    Location
    Pennsylvania
    MS-Off Ver
    Office 2013
    Posts
    6

    Trouble getting a conditional Sumproduct formula to work

    I'm trying to use a conditional sumproduct formula to automatically find the weighted average for different markets' avg. household income and unemployment rate. I've tried the following formula:

    =SUMPRODUCT((--A:A=F2),B:B,C:C)/SUMIF(A:A,F2,B:B)

    I know the SUMIF part works, but the SUMPRODUCT portion does not. I keep getting a "#VALUE!" error. What am I doing wrong with it? Thanks for your help!
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Trouble getting a conditional Sumproduct formula to work

    I think you are trying to do this in G2:

    =SUMPRODUCT(--(A:A=F2),B:B,C:C)/SUMIF(A:A,F2,B:B)

    You had a bracket in the wrong place.

    However, it is not a good idea to use full column references with SUMPRODUCT, as every cell in the range will be used in the calculation. Notice how sluggish it is when you copy the formula down.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    09-14-2018
    Location
    Pennsylvania
    MS-Off Ver
    Office 2013
    Posts
    6

    Re: Trouble getting a conditional Sumproduct formula to work

    Awesome, thanks for doing this. I also realized that I had a few N/A values which threw everything off. Now it works perfectly!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Trouble getting a conditional Sumproduct formula to work

    Glad to hear that.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. Trouble with sumproduct formula counting blanks as 1
    By BruceMayneCoon in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-01-2017, 02:56 PM
  2. Having trouble getting a array formula to work with larger dataset
    By Revam in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-13-2017, 10:13 AM
  3. [SOLVED] Having trouble getting same formula to work in different cells
    By notsofast in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-01-2015, 04:15 PM
  4. Having trouble with SUMPRODUCT formula
    By JohnEnglish in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-21-2014, 03:46 PM
  5. [SOLVED] I’m having trouble getting my nested IF formula to work.
    By Oscar Martin in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-05-2013, 05:46 PM
  6. Trouble Shooting SumProduct Formula
    By rgold in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-01-2009, 01:42 PM
  7. Conditional formula trouble
    By Krohned1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-26-2008, 04:21 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