Weighted Average Of Filtered Data

Coach Hager

New Member
Joined
Oct 27, 2008
Messages
27
How do I calculate the weighted average of filtered data? I want it to calculate for any filter in column A.

A B C
1 ITEM UNITS UNIT PRICE
2 TV 10 $100
3 RADIO 5 $20
4 RADIO 10 $15
5 TV 20 $120

When I filter by column A I want the weighted average to show in cell C6. Results should be as follows. When column A is filtered by "TV" weighted average in C6 should show $113.33. When the filter in column A is changed to "RADIO" I want cell c6 (weighted average) to show $16.67
 
Last edited:

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi,

=SUMPRODUCT(SUBTOTAL(3,OFFSET(A2:A5,ROW(A2:A5)-ROW(A2),,1)),B2:B5,C2:C5)/SUBTOTAL(9,B2:B5)

adjust the range.
 
Upvote 0
Hello,

Is there anyway to use this formula so that the range wouldn't have to be adjusted when using a filtered list? I would like only visible cells to calculate....

Thank you!!
 
Upvote 0

Forum statistics

Threads
1,223,833
Messages
6,174,907
Members
452,590
Latest member
CraiginColorado

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