Weighted Average with multiple Criteria

EdE

Board Regular
Joined
Apr 8, 2002
Messages
241
Hi,
I have a challenge of creating a weighted average with multiple criteria. I have data that is similar to this.
[TABLE="width: 320"]
<colgroup><col width="64" span="5" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]Region[/TD]
[TD="width: 64"]Location[/TD]
[TD="width: 64"]PN[/TD]
[TD="width: 64"]Qty[/TD]
[TD="width: 64"]Sales[/TD]
[/TR]
[TR]
[TD]USA[/TD]
[TD]Dallas[/TD]
[TD="align: right"]1234[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]USA[/TD]
[TD]Dallas[/TD]
[TD="align: right"]5678[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]10000[/TD]
[/TR]
[TR]
[TD]USA[/TD]
[TD]NY[/TD]
[TD="align: right"]1234[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]10000[/TD]
[/TR]
[TR]
[TD]USA[/TD]
[TD]LA[/TD]
[TD="align: right"]1234[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]USA[/TD]
[TD]LA[/TD]
[TD="align: right"]1234[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]10000[/TD]
[/TR]
[TR]
[TD]USA[/TD]
[TD]NY[/TD]
[TD="align: right"]5678[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]1000[/TD]
[/TR]
[TR]
[TD]UK[/TD]
[TD]England[/TD]
[TD="align: right"]1234[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]UK[/TD]
[TD]Ireland[/TD]
[TD="align: right"]5678[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]20000[/TD]
[/TR]
[TR]
[TD]UK[/TD]
[TD]Ireland[/TD]
[TD="align: right"]1234[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]20000[/TD]
[/TR]
[TR]
[TD]UK[/TD]
[TD]Ireland[/TD]
[TD="align: right"]1234[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]2000[/TD]
[/TR]
[TR]
[TD]UK[/TD]
[TD]Scotland[/TD]
[TD="align: right"]1234[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]20000[/TD]
[/TR]
[TR]
[TD]UK[/TD]
[TD]Scotland[/TD]
[TD="align: right"]5678[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]2000[/TD]
[/TR]
</tbody>[/TABLE]

I need to find the weighted average of Sales based on quantity but where a certain combination of criteria is defined. I need the weighted Average of PN 1234 in the USA region in the LA location.
I know how to do this with one criteria but not multiple. Sumproduct formulas are not my strong suit.:laugh:
thanks!!
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Try this:


Excel 2010
ABCDEFGHIJ
1RegionLocationPNQtySalesPNRegionLocationWeighted Avg
2USADallas123411001234USALA9100
3USADallas567810010000
4USANY123410010000
5USALA123410100
6USALA123410010000
7USANY5678101000
8UKEngland12342200
9UKIreland567820020000
10UKIreland123420020000
11UKIreland1234202000
12UKScotland123420020000
13UKScotland5678202000
Sheet1
Cell Formulas
RangeFormula
J2=SUMPRODUCT(--($A$2:$A$13=H2),--($B$2:$B$13=I2),--($C$2:$C$13=G2),$D$2:$D$13,$E$2:$E$13)/SUMIFS($D$2:$D$13,$A$2:$A$13,H2,$B$2:$B$13,I2,$C$2:$C$13,G2)
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,193
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top