Weighted Average Based on Multiple Criteria

zach9208

Board Regular
Joined
Dec 15, 2015
Messages
117
I need help writing a formula to do a weighted average base on multiple criteria. I have 4 main columns. Below is an small sample with dummy data. I really have about 500+ records.

Marginal Revenue (bps) | Product Code | Trade Month | Loan Amt |
.34 | C30 | 1511| 150,000
.36 | C30 | 1511| 190,000
.31 | C30 | 1508| 150,000
.50 | C30 | 1511| 140,000
.34 | C15 | 1510| 150,000
.36 | C30 | 1511| 190,000
.31 | C20 | 1512| 150,000
.50 | C30 | 1511| 140,000

I need to do a weighted average based on marginal revenue and loan amt. However, I must meet the criteria listed below.

Product Code=C30 & Trade Month=1511


Thanks in advance!!!!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
easy to sum the loan amount for your criteria, but how are you going to do your weighted average as opposed to 810,000 divide by 5
 
Upvote 0
Always mention what the weights are...

Rich (BB code):
=SUMPRODUCT($D$2:D$9,$A$2:$A$9,--($B$2:$B$9="C30"),--($C$2:$C$9=1511))/
    SUMIFS($A$2:$A$9,$B$2:$B$9,"C10",$C$2:$C$9,1511)

Is this what you are after?
 
Upvote 0
That is the problem. I think I need to nest a (sumifs) inside a sumproduct to filter out to show just C30 and the trade month 1511.

Doing this manually, I believe the answer is a weighted average of 0.40469/

I should have mentioned this before. I need the weighted average of marginal revenue by loan amount.
 
Upvote 0
I have been playing around with a formula just like that. I will give it a try and let you know.
 
Upvote 0
Appears to be working. I have to modify it a little bit. Thanks, Aladin.

Always mention what the weights are...

Rich (BB code):
=SUMPRODUCT($D$2:D$9,$A$2:$A$9,--($B$2:$B$9="C30"),--($C$2:$C$9=1511))/
    SUMIFS($A$2:$A$9,$B$2:$B$9,"C10",$C$2:$C$9,1511)

Is this what you are after?
 
Upvote 0

Forum statistics

Threads
1,215,509
Messages
6,125,216
Members
449,215
Latest member
texmansru47

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