+ Reply to Thread
Results 1 to 8 of 8

Weighted Average with Criteria

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

    Weighted Average with Criteria

    Hi,

    Can someone help create a formula for weighted averages according to criteria?

    I want to know what was the average price I bought a product at on today's date. The average price needs to be weighted against the quantity of product sold.

    I have attached the excel and would greatly appreciate help!

    Thanks,

    Leopold2000
    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: Weighted Average with Criteria

    Try this formula in C2

    =SUMPRODUCT((A4:A100=A2)+0,B4:B100,C4:C100)/SUMIF(A4:A100,A2,B4:B100)
    Audere est facere

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

    Re: Weighted Average with Criteria

    Doesn't seem to work - tried putting it into the excel and no luck.

  4. #4
    Forum Contributor
    Join Date
    09-11-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003, Excel 2007, Excel 2013
    Posts
    103

    Re: Weighted Average with Criteria

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


    Same as Daddylongleg formula.

    Your attachment cell format is set as date. It is why you get ##### value. I changed it to number format. See attachment.
    Attached Files Attached Files
    Click * to reward me...
    Thank you...

  5. #5
    Registered User
    Join Date
    06-05-2018
    Location
    Pune
    MS-Off Ver
    8
    Posts
    2

    Re: Weighted Average with Criteria

    how to determine 'Weighted Average Supply Date" where supplies made as detailed below:

    01-Mar-2018 - 110
    30-Mar-2018 - 90
    05-May-2018 - 72

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Weighted Average with Criteria

    A
    B
    C
    D
    2
    1-Mar-18
    110
    27-Mar-18
    C2: =SUMPRODUCT(A2:A4, B2:B4)/SUM(B2:B4)
    3
    30-Mar-18
    90
    4
    5-May-18
    72
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Registered User
    Join Date
    06-05-2018
    Location
    Pune
    MS-Off Ver
    8
    Posts
    2

    Re: Weighted Average with Criteria

    Thank you very much.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,223

    Re: Weighted Average with Criteria

    Gorthisubra - please do not hijack other members' threads in future - start your own!
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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