Forum Discussion

Deleted's avatar
Deleted
Sep 06, 2018
Solved

Weighted Average with multiple criteria and looking for specific name

Hi, I'm trying to figure out how to get the weighted average price of multiple products within the same class.  For example see the sheet below.  I want to find the weighted average price of all coke...
  • Haytham Amairah's avatar
    Sep 07, 2018

    Hi Blake,

     

    Please try this formula:

    =AVERAGE(AVERAGEIFS(D2:D8, A2:A8,{"Coke","VanillaCoke","CherryCoke"}))

    With this formula, you don't have to manually calculate the Qty.

     

    But the best way is to create another column in the table to hold the class for each product.

    This will make the calculation easier so that you don't have to hard-code each product in the formula.

     

    This can be done as follows:

     

     

    Please find the attached workbook

    Hope that helps

Resources