+ Reply to Thread
Results 1 to 10 of 10

Weighted average through sumproduct

  1. #1
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Weighted average through sumproduct

    Happy New Year all,

    I need to find the weighted average of my labour, mats and sub con against their respective values. I used sumproduct about 6 years ago and have forgotten the conventions used.

    Any chance of some help? Looking for the answer to be in the amber column on the attached spreadsheet?

    Thanks

    Andrew
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Weighted average through sumproduct

    try below formula in K2, Copy and paste towards down
    =SUMPRODUCT(A2:G2,B2:H2,--(A$1:G$1="Cost"))/J2
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Weighted average through sumproduct

    K2:

    =sumproduct(a2:g2*b2:h2)/j2
    Quang PT

  4. #4
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Weighted average through sumproduct

    Thanks for the responses

    If I needed to add another bit on what would second part of the problem be?

    There is a new tab called FAC Codes

    On the original tab I have inserted a column in column A with some sample FAC codes.

    On the FAC code tab I need to have the weighted average against value against each FAC code.

    Thanks very much
    Attached Files Attached Files

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Weighted average through sumproduct

    try below formula
    b2=SUMPRODUCT((Sheet1!$B$2:$H$4)*(Sheet1!$C$2:$I$4)*(Sheet1!$B$1:$H$1="Cost")*(Sheet1!$A$2:$A$4=$A2))/SUMPRODUCT((Sheet1!$B$2:$H$4)*(Sheet1!$B$1:$H$1="Cost")*(Sheet1!$A$2:$A$4=$A2))

  6. #6
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Weighted average through sumproduct

    Hi again,

    I have tried altering the formula for mats and sub-cons but the output keeps looking wrong.

    Could you provide the formula for the cells on the FAC Codes tabs, to calculated the weighted average for labour, materials and sub-cons from the data on the test tab?
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Weighted average through sumproduct

    Anyone able to solve the weighted average 3 problem please?

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Weighted average through sumproduct

    Try pasting the following into cell B2 on the FAC Codes sheet:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    After you have copied the formula by dragging the fill handle down to cell B4 and while B2:B4 are still selected press the Ctrl and c keys
    Select cell D2 and press the Ctrl and v keys
    Select cell F2 and press the Ctrl and v keys
    Press the Esc key
    Remove the s from Sub-Cons in cell F1 (or add an s to Sub-Con in cell I1 on the Test sheet).
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  9. #9
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Weighted average through sumproduct

    Many thanks JeteMc

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Weighted average through sumproduct

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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] Calculating an average vs. weighted average
    By jk2391 in forum Excel General
    Replies: 3
    Last Post: 12-11-2020, 02:09 PM
  2. Replies: 4
    Last Post: 07-19-2019, 04:47 PM
  3. Weighted Average Function for Series Weighted by Increments of 1
    By kratsexcel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-05-2018, 11:38 AM
  4. Replies: 0
    Last Post: 02-15-2018, 03:04 AM
  5. Query regarding Calculating Weighted average value or average value in Percentage.
    By adamsmith1337 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-03-2016, 07:56 AM
  6. [SOLVED] Average Percentage (weighted average) but I want to exclude N/A
    By mespinoza in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 12-28-2015, 02:53 PM
  7. [SOLVED] What is this kind of average called?-weighted average
    By havocdragon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-24-2005, 01:05 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