Help with Weighted Average

K

Kim

Can someone please help me to find a way round my problem. Here is a sample of


A B C D E
Product City Price Room night
H1 ROME 100.00 15
H2 LONDON 105.00 100
H3 ROME 203.00 5
H4 ROME 150.00 115
H5 LONDON 200.00 5

This is what I need.
On Column E I need the weighted average price for H1 based on room night.

Thanks.
 
K

Kim

My sample data only have two cities but the actual data I have consist more
than 50 cities. So what's the best way ?
 
B

bnmohan via OfficeKB.com

Would a PivotTable help?

Mohan
My sample data only have two cities but the actual data I have consist more
than 50 cities. So what's the best way ?
=SUMPRODUCT(C$2:C$6,D$2:D$6,--(B$2:B$6=B2))/SUMIF(B$2:B$6,B2,D$2:D$6)
--
[quoted text clipped - 29 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top