Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Kim Kim is offline
external usenet poster
 
Posts: 284
Default Help with Weighted Average

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Help with Weighted Average

=SUMPRODUCT(C2:C6,D2:D6)/SUM(D2:D6)
--
David Biddulph

Kim wrote:
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.



  #3   Report Post  
Posted to microsoft.public.excel.misc
Kim Kim is offline
external usenet poster
 
Posts: 284
Default Help with Weighted Average

Hi David,

Thanks.

But I need to have the average based on the same city.

Regards,
Kim

"David Biddulph" wrote:

=SUMPRODUCT(C2:C6,D2:D6)/SUM(D2:D6)
--
David Biddulph

Kim wrote:
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.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Help with Weighted Average

Maybe...

=SUMPRODUCT(--(b2:b6="Rome"),C2:C6,D2:D6)/SUMif(b2:b6,"rome",D2:D6)

Kim wrote:

Hi David,

Thanks.

But I need to have the average based on the same city.

Regards,
Kim

"David Biddulph" wrote:

=SUMPRODUCT(C2:C6,D2:D6)/SUM(D2:D6)
--
David Biddulph

Kim wrote:
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.





--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Help with Weighted Average

=SUMPRODUCT(C$2:C$6,D$2:D$6,--(B$2:B$6=B2))/SUMIF(B$2:B$6,B2,D$2:D$6)
--
David Biddulph

Kim wrote:
Hi David,

Thanks.

But I need to have the average based on the same city.

Regards,
Kim

"David Biddulph" wrote:

=SUMPRODUCT(C2:C6,D2:D6)/SUM(D2:D6)
--
David Biddulph

Kim wrote:
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.





  #6   Report Post  
Posted to microsoft.public.excel.misc
Kim Kim is offline
external usenet poster
 
Posts: 284
Default Help with Weighted Average

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

"David Biddulph" wrote:

=SUMPRODUCT(C$2:C$6,D$2:D$6,--(B$2:B$6=B2))/SUMIF(B$2:B$6,B2,D$2:D$6)
--
David Biddulph

Kim wrote:
Hi David,

Thanks.

But I need to have the average based on the same city.

Regards,
Kim

"David Biddulph" wrote:

=SUMPRODUCT(C2:C6,D2:D6)/SUM(D2:D6)
--
David Biddulph

Kim wrote:
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.




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Help with Weighted Average

Would a PivotTable help?

Mohan

Kim wrote:
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]

Thanks.


--
Message posted via http://www.officekb.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is, and should I use Weighted Average? ArcticWolf Excel Worksheet Functions 4 January 14th 09 01:50 AM
weighted average Whitney Setting up and Configuration of Excel 6 February 6th 08 05:11 PM
Weighted Average Gage Teacher Excel Worksheet Functions 2 January 16th 06 04:50 PM
Weighted Average MedicEric New Users to Excel 2 November 26th 05 07:29 PM
Non zero weighted average jeffsfas Excel Worksheet Functions 10 June 20th 05 08:41 PM


All times are GMT +1. The time now is 03:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"