Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default weighted avg. of groups in table

i have a table with group #s in column A and values in column B.
i am using the formula below to calculate the average value (ignoring nulls)
of the relevant group on each row.
if i add a weighting in C1:C10 how do i calculate the weighted average of
each group?

=SUM(SUMIF(A1:A10,A1,B1:B10))/SUMPRODUCT((A1:A10=A1)*(B1:B10<""))

thanks in advance for your time.
DK
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default weighted avg. of groups in table

=SUMPRODUCT(--(A1:A10=A1),--(B1:B10<""),C1:C10,B1:B10)/SUMPRODUCT(--(A1:A10=A1),--(B1:B10<""),C1:C10)

--
Regards,
Tom Ogilvy


"dkingston" wrote:

i have a table with group #s in column A and values in column B.
i am using the formula below to calculate the average value (ignoring nulls)
of the relevant group on each row.
if i add a weighting in C1:C10 how do i calculate the weighted average of
each group?

=SUM(SUMIF(A1:A10,A1,B1:B10))/SUMPRODUCT((A1:A10=A1)*(B1:B10<""))

thanks in advance for your time.
DK

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default weighted avg. of groups in table

this worked perfectly.
thanks for this and for the earlier formula.
you are an excel rock-star!

"Tom Ogilvy" wrote:

=SUMPRODUCT(--(A1:A10=A1),--(B1:B10<""),C1:C10,B1:B10)/SUMPRODUCT(--(A1:A10=A1),--(B1:B10<""),C1:C10)

--
Regards,
Tom Ogilvy


"dkingston" wrote:

i have a table with group #s in column A and values in column B.
i am using the formula below to calculate the average value (ignoring nulls)
of the relevant group on each row.
if i add a weighting in C1:C10 how do i calculate the weighted average of
each group?

=SUM(SUMIF(A1:A10,A1,B1:B10))/SUMPRODUCT((A1:A10=A1)*(B1:B10<""))

thanks in advance for your time.
DK

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
weighted average from table Cam Excel Worksheet Functions 4 November 27th 08 07:08 AM
weighted averages in a pivot table - how? Vic Excel Worksheet Functions 0 April 22nd 08 07:07 PM
Weighted Average in Pivot table Mischa Excel Worksheet Functions 1 September 21st 06 03:23 PM
weighted average on a pivot table Marilyn Excel Discussion (Misc queries) 2 September 10th 06 10:02 PM
weighted average in pivot table nasser Excel Discussion (Misc queries) 3 January 18th 06 04:36 PM


All times are GMT +1. The time now is 10:52 PM.

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

About Us

"It's about Microsoft Excel"