+ Reply to Thread
Results 1 to 7 of 7

Can't get SUMPRODUCT to calculate weighted average when criteria is in different rows

  1. #1
    Registered User
    Join Date
    06-24-2013
    Location
    New York
    MS-Off Ver
    Excel 2011
    Posts
    24

    Can't get SUMPRODUCT to calculate weighted average when criteria is in different rows

    I need help getting SUMPRODUCT to calculate weighted revenue generated by a business in both its onshore and offshore activities. I've attached a file demonstrating my problem: In the file, under Example 1, I show how I was able to successfully calculate the weighted revenue when all columns nicely align, however, you can see in Example 2 that the formula fails me when the data I'm trying to manipulate exists on different rows - even though column ranges referenced throughout the formula are of equal length. Any suggestions on how I can tweak my formula?
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Can't get SUMPRODUCT to calculate weighted average when criteria is in different rows

    I'm not sure how that's supposed to work in example 2 - are the %s in the Expenses rows actually figures for revenue? If not then how do you know the revenue figures if those are blank?
    Audere est facere

  3. #3
    Registered User
    Join Date
    06-24-2013
    Location
    New York
    MS-Off Ver
    Excel 2011
    Posts
    24

    Re: Can't get SUMPRODUCT to calculate weighted average when criteria is in different rows

    This is just a sample workbook. In example 2, the numbers in the expense row actually are revenues, not expenses. If I were to edit my workbook, I would change the word expenses to something else like "Revenue %". The main problem I'm trying to solve is how to get SUMPRODUCT to work with multiple criteria when the values that match that criteria are located on different rows. Hope that helps.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Can't get SUMPRODUCT to calculate weighted average when criteria is in different rows

    If you expect to get 700 as the result as per example 1 try this for onshore

    =SUMPRODUCT(--($H$3:$H$13=$H$3),$I$4:$I$14,$K$3:$K$13)

  5. #5
    Registered User
    Join Date
    06-24-2013
    Location
    New York
    MS-Off Ver
    Excel 2011
    Posts
    24

    Re: Can't get SUMPRODUCT to calculate weighted average when criteria is in different rows

    Thank you. By changing the range, I am now able to get the desired result of $700 for Weighted Onshore Revenue. However, when I copy that formula down one row to calculate Weighted Offshore Revenue in cell N7, I get a 0 value. This is after I adjusted the formula =SUMPRODUCT(--($H$3:$H$13=$H$3),$I$4:$I$14,$K$3:$K$13) to =SUMPRODUCT(--($H$3:$H$13=$H$4),$I$4:$I$14,$K$3:$K$13). Should I be changing the range here, also, or possibly use an OFFSET? It is the case, as in this sample workbook, that my revenue number and weighting will be on different rows.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Can't get SUMPRODUCT to calculate weighted average when criteria is in different rows

    Isn't it the same as onshore except for column J in place of I?

    =SUMPRODUCT(--($H$3:$H$13=$H$3),$J$4:$J$14,$K$3:$K$13)

  7. #7
    Registered User
    Join Date
    06-24-2013
    Location
    New York
    MS-Off Ver
    Excel 2011
    Posts
    24

    Re: Can't get SUMPRODUCT to calculate weighted average when criteria is in different rows

    You would think so, however, when I put in =SUMPRODUCT(--($H$3:$H$13=$H$4),$J$4:$J$14,$K$3:$K$13) I get a "0" result.

+ 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. Weighted Average IF (sumproduct conditional)
    By Leopold2000 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-16-2013, 03:27 PM
  2. [SOLVED] Calculate a weighted average in a single cell based on multiple criteria
    By _Bryan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-14-2013, 04:38 PM
  3. [SOLVED] Help with IF and SUMPRODUCT to calculate weighted average??
    By consulttk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-02-2012, 03:56 PM
  4. SUMPRODUCT Issue - Need to calculate weighted average of multiple ranges
    By arcobalt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-01-2012, 04:55 PM
  5. Replies: 10
    Last Post: 06-28-2012, 08:59 AM

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