fb1990
asked on
Weighted Average Based On Category data from 3 Columns
Hello EE,
Can someone please help me write a weighted average formula to calculate the weighted average for Sammy Puff? I need to calculate the weighted average for Online, Fax, Mail in column c and Sammy Puff in columns A and B
I have attached a sample data.
Thank you.
Book44.xlsx
Can someone please help me write a weighted average formula to calculate the weighted average for Sammy Puff? I need to calculate the weighted average for Online, Fax, Mail in column c and Sammy Puff in columns A and B
I have attached a sample data.
Thank you.
Book44.xlsx
ASKER
Hi itjockey,
How can i add Sammy Puff in Columns A and B to the formula. I only need the calculation if the value in column A is Sammy Puff and value in column B is Sammy Puff...
How can i add Sammy Puff in Columns A and B to the formula. I only need the calculation if the value in column A is Sammy Puff and value in column B is Sammy Puff...
i dint find any match where column A = Sammy Puff and column B =Sammy Puff in same row ...that is why i had consider only column B
=SUMPRODUCT(($C$2:$C$160=J2)*($B$2:$B$160=$I3)*($A$2:$A$160=$I3)*$D$2:$E$160)/SUMIFS($D$2:$D$160,$A$2:$A$160,$I3,$B$2:$B$160,$I3,$C$2:$C$160,J2)
For column J3 and copy across
ASKER
oh. It is an OR. Where A = Sammy Puff OR column B =Sammy Puff
sorry change I3 = 'Sammy Puff in your excel
Formula requires same name in column A and B in the row, but it has to be A or B.
To get the product sum $D$2:$E$160 must be $D$2:$D$160*$E$2:$E$160
With the names in column I, the formula in J3 will be.
Copy down and across for all names.
See sheet.
Book44.xlsx
To get the product sum $D$2:$E$160 must be $D$2:$D$160*$E$2:$E$160
With the names in column I, the formula in J3 will be.
=(SUMPRODUCT(($A$2:$A$160=$I3)*($C$2:$C$160=J$2)*$D$2:$D$160*$E$2:$E$160)+SUMPRODUCT(($B$2:$B$160=$I3)*($C$2:$C$160=J$2)*$D$2:$D$160*$E$2:$E$160))/(SUMPRODUCT(($A$2:$A$160=$I3)*($C$2:$C$160=J$2))+SUMPRODUCT(($B$2:$B$160=$I3)*($C$2:$C$160=J$2)))
Copy down and across for all names.
See sheet.
Book44.xlsx
ASKER
Hi Ejgil Hedegaard
I need the percentages to be shown
I need the percentages to be shown
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much!
Open in new window
Cell K3Open in new window
Cell L3Open in new window
Thanks