+ Reply to Thread
Results 1 to 4 of 4

Weighted Average IF (sumproduct conditional)

  1. #1
    Registered User
    Join Date
    12-03-2012
    Location
    Ecuador
    MS-Off Ver
    Excel 2010
    Posts
    46

    Weighted Average IF (sumproduct conditional)

    Hi,

    I need a formula that gives me the weighted average of some values if they fall within a certain week.

    So I have Weeks 1 to 6.

    In each week there are multiple deliveries of different weights with different ratings. I would a like a formula that tells me average rating (weighted average - presumably using a sumproduct formula) of each week.

    The end result is a table with the week in column A and the weighted average rating of that week in column B.

    I have attached the excel to illustrate the problem.

    Any help would be great, and would be even better if you could put the formula into the excel and share so I can see it working!

    Thanks,

    Leo
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Weighted Average IF (sumproduct conditional)

    Try this, copied down...
    =SUMPRODUCT(($E$2:$E$25=A2)*($F$2:$F$25)*($G$2:$G$25))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Valued Forum Contributor
    Join Date
    05-13-2010
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Excel 2003; 2007
    Posts
    441

    Re: Weighted Average IF (sumproduct conditional)

    Leopold2000, Good afternoon.

    May I try to give some contribuition?

    I think Weighted Average is interpreted by the formula as follow:

    =SUMPRODUCT(($E$2:$E$25=A2)*($F$2:$F$25)*($G$2:$G$25))/SUMIF($E$2:$E$25,A2,$G$2:$G$25)

    Please, let me know if itīs different.
    I hope it helps.

    Attention! What you want to do when the ratings of a range is 0,00 ?


    Regards from Brazil
    ...If my answer helped you, Please, click on. * Add Reputation (at left)

    Best regards.
    Marc?lio Lob?o

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Weighted Average IF (sumproduct conditional)

    Create a helper column H and enter this formula in H2 and copy down the length of your data:

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


    In B2 enter this and copy down the length of your data:

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


    In column G you have several 0 values. I understand this to mean to take the value in column F as is otherwise multiply column F values by the values in column G.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. Need help with Sumproduct and Weighted Average - File Attached
    By sachinattri in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-20-2013, 02:30 PM
  2. [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
  3. 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
  4. unique lists, sumproduct, weighted average
    By mattmuphy in forum Excel General
    Replies: 3
    Last Post: 04-23-2012, 04:00 PM
  5. Dollar Weighted Average Sumproduct Formula:
    By pipsturbo in forum Excel General
    Replies: 6
    Last Post: 12-07-2009, 07:13 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