Average of max weight

phil133

Board Regular
Joined
May 5, 2015
Messages
244
Office Version
  1. 2016
Platform
  1. Windows
Hi. I'm copying the data and the desired fields D and E. Column A have some scenarios from 1 to 100. Column B has dates. Column C has weights.
1) How can I get the max weight for the same scenario and trade date please?
2) How can I get the average of the max weight by scenario please?
I tried to do it with pivots but I can't find how I can get the average of the max weight by scenario.
Thank you.
sample.xlsx
ABCDE
1ScenarioTradeDateWeightMax weightAverage max weight by scenario
211/4/20167.50%
311/4/20161.30%
411/4/201611.50%11.50%
511/8/20165.00%
611/8/20160.50%
711/8/20164.10%
811/8/20162.60%5.00%8.25%
921/8/20168.00%
1021/8/20166.40%
1121/8/20161.30%
1221/8/20163.80%
1321/8/20160.30%8.00%
1421/22/20167.00%
1521/22/20166.40%
1621/22/20161.30%
1721/22/20163.80%
1821/22/20160.30%
1921/22/20169.00%9.00%8.50%
Sheet7
Cell Formulas
RangeFormula
D4D4=MAX(C2:C4)
D8D8=MAX(C5:C8)
E8E8=AVERAGE(D2:D8)
D13D13=MAX(C9:C13)
D19D19=MAX(C14:C19)
E19E19=AVERAGE(D9:D19)
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
10,940
Try:

Book1
ABCDE
1ScenarioTradeDateWeightMax weightAverage max weight by scenario
211/4/20167.50%  
311/4/20161.30%  
411/4/201611.50%11.50% 
511/8/20165.00%  
611/8/20160.50%  
711/8/20164.10%  
811/8/20162.60%5.00%8.25%
921/8/20168.00%  
1021/8/20166.40%  
1121/8/20161.30%  
1221/8/20163.80%  
1321/8/20160.30%8.00% 
1421/22/20167.00%  
1521/22/20166.40%  
1621/22/20161.30%  
1721/22/20163.80%  
1821/22/20160.30%  
1921/22/20169.00%9.00%8.50%
Sheet8
Cell Formulas
RangeFormula
D2:D19D2=IF(AND(A2=A3,B2=B3),"",AGGREGATE(14,6,C$2:C2/(A$2:A2=A2)/(B$2:B2=B2),1))
E2:E19E2=IF(A2=A3,"",AVERAGEIF(A$2:A2,A2,D$2:D2))
 
Solution

phil133

Board Regular
Joined
May 5, 2015
Messages
244
Office Version
  1. 2016
Platform
  1. Windows
Thank you Eric! This works!
 

Watch MrExcel Video

Forum statistics

Threads
1,132,706
Messages
5,654,841
Members
418,155
Latest member
demasisi

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
Top