Average of top 150 cells from one column

knoll126

New Member
Joined
Mar 24, 2015
Messages
23
Office Version
  1. 365
Hi,

I have Column A that has 500 names in it. Column C has 500 lines with values from -7 to 35. I would like to return the average of the top 150 cells in Column C. The output would be on a second tab.

The second question is I have Column B that has data in the cells. I would like to be able to see the average of those cells based on the top 150 cells in Column C. Again with the output on a second tab.

Any help would be appericaited. When I was googling for answers I was only find results for top 3 or so values and not 150!

Data Example.xlsx
ABC
1Full NameStrato ABsNERP OFF WGHT
2Mike Trout3630.28
3Bryce Harper14727.35
4Byron Buxton6226.33
5Jose Siri11.823.96
6Fernando Tatis Jr.13524.35
7Juan Soto161.822.9
8Brandon Belt93.322.07
9Jesse Winker11919.65
10Starling Marte127.521.66
11Vladimir Guerrero Jr.172.521.51
12Cedric Mullins II165.321.27
13Ronald Acuna Jr.86.523.19
14Kyle Schwarber115.820.82
15Brandon Lowe150.819.21
16Jared Walsh144.517.64
17Joey Votto131.319.41
18Rafael Devers163.319.39
19Brandon Nimmo94.820.41
20Brandon Crawford134.818.58
21Ramon Urias72.517.91
22Kyle Isbel20.818.64
23Mitch Garver59.518.74
24Frank Schwindel64.521.61
25Brett Phillips71.516.53
26J.D. Davis50.819.3
27Rafael Ortega81.516.03
28Michael Brantley125.518.05
29Thairo Estrada32.516.9
30Kyle Tucker139.819.73
31A.J. Pollock103.518.64
32Luis Robert72.36.91
33Alex Verdugo148.816.47
34Freddie Freeman171.317.84
35Tyler O'Neill13020.39
36Austin Riley160.517.76
37Riley Adams28.517.47
38Corey Seager100.319.23
39Santiago Espinal6118.96
40Nick Castellanos14318.43
41Adam Frazier156.317.71
42Tony Kemp95.517.87
43Bryan Reynolds158.518.88
44Xander Bogaerts147.817.49
45Will Smith11816.15
46Jason Castro43.514.77
47Myles Straw157.815.84
48Yoan Moncada15116.78
49Matt Olson163.318.81
50Marcus Semien179.516.05
51Shohei Ohtani158.318.45
52Alex Avila2713.6
53Nico Hoerner41.516.02
54Nicky Lopez136.516.81
55Mookie Betts133.517.09
56Matt Vierling18.817.53
57Yuli Gurriel147.317.3
58Travis Jankowski38.315.34
59Max Schrock33.312.12
60J.D. Martinez156.315.4
61Aaron Judge156.317.46
62Trea Turner15919.29
63Jonathan India150.816.67
64Jose Ramirez15616.1
65Yasmani Grandal91.517.88
66Josh Harrison13415.47
67Justin Turner148.515.25
68Kevin Kiermaier95.315.36
69Akil Baddoo114.513.85
70Brandon Marsh6414.43
71Zack Collins57.312.48
72Austin Meadows144.313.47
73George Springer8416.28
74Darin Ruf7717.15
75Jacob Stallings105.813.38
76Joey Gallo152.315.05
77Jose Altuve166.814.97
78Tyler Stephenson97.815.3
79Buster Posey112.817.28
80Jeimer Candelario155.515.26
81Tim Anderson137.315.62
82Ty France154.315.62
83Luis Arraez117.814.71
84Pete Alonso155.315.19
85Carlos Correa157.515.61
86Brian Anderson64.811.99
87Connor Joe51.315.92
88Kris Bryant143.815.54
89Willy Adames138.513.99
90Whit Merrifield17614.82
91J.P. Crawford169.314.22
92Mike Yastrzemski129.812.39
93Giancarlo Stanton143.314.95
94Max Muncy14516.13
95C.J. Cron132.515.65
96Brian Goodwin6710.98
97Ji-Man Choi75.812.9
98Raimel Tapia131.813.42
99Paul Goldschmidt167.517.14
100Jake Fraley6513.43
Example
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also what exactly do you mean by the top 150 cells?
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also what exactly do you mean by the top 150 cells?
Sorry, when referring to top I mean the top highest value. So if sorting from Largest to Smallest it would be the first 150 results.

Also using office 365 and updated it in my profile, thanks!
 
Upvote 0
Thanks for that. How about
+Fluff 1.xlsm
ABCDEFG
1Full NameStrato ABsNERP OFF WGHT50Avg BAvg C
2Mike Trout3630.28113.20819.7382
3Bryce Harper14727.35
4Byron Buxton6226.33
5Jose Siri11.823.96
6Fernando Tatis Jr.13524.35
7Juan Soto161.822.9
8Brandon Belt93.322.07
9Jesse Winker11919.65
10Starling Marte127.521.66
11Vladimir Guerrero Jr.172.521.51
12Cedric Mullins II165.321.27
13Ronald Acuna Jr.86.523.19
14Kyle Schwarber115.820.82
15Brandon Lowe150.819.21
16Jared Walsh144.517.64
17Joey Votto131.319.41
18Rafael Devers163.319.39
19Brandon Nimmo94.820.41
20Brandon Crawford134.818.58
21Ramon Urias72.517.91
22Kyle Isbel20.818.64
23Mitch Garver59.518.74
24Frank Schwindel64.521.61
25Brett Phillips71.516.53
26J.D. Davis50.819.3
27Rafael Ortega81.516.03
28Michael Brantley125.518.05
29Thairo Estrada32.516.9
30Kyle Tucker139.819.73
31A.J. Pollock103.518.64
32Luis Robert72.36.91
33Alex Verdugo148.816.47
34Freddie Freeman171.317.84
35Tyler O'Neill13020.39
36Austin Riley160.517.76
37Riley Adams28.517.47
38Corey Seager100.319.23
39Santiago Espinal6118.96
40Nick Castellanos14318.43
41Adam Frazier156.317.71
42Tony Kemp95.517.87
43Bryan Reynolds158.518.88
44Xander Bogaerts147.817.49
45Will Smith11816.15
46Jason Castro43.514.77
47Myles Straw157.815.84
48Yoan Moncada15116.78
49Matt Olson163.318.81
50Marcus Semien179.516.05
51Shohei Ohtani158.318.45
52Alex Avila2713.6
53Nico Hoerner41.516.02
54Nicky Lopez136.516.81
55Mookie Betts133.517.09
56Matt Vierling18.817.53
57Yuli Gurriel147.317.3
58Travis Jankowski38.315.34
59Max Schrock33.312.12
60J.D. Martinez156.315.4
61Aaron Judge156.317.46
62Trea Turner15919.29
63Jonathan India150.816.67
64Jose Ramirez15616.1
65Yasmani Grandal91.517.88
66Josh Harrison13415.47
67Justin Turner148.515.25
68Kevin Kiermaier95.315.36
69Akil Baddoo114.513.85
70Brandon Marsh6414.43
71Zack Collins57.312.48
72Austin Meadows144.313.47
73George Springer8416.28
74Darin Ruf7717.15
75Jacob Stallings105.813.38
76Joey Gallo152.315.05
77Jose Altuve166.814.97
78Tyler Stephenson97.815.3
79Buster Posey112.817.28
80Jeimer Candelario155.515.26
81Tim Anderson137.315.62
82Ty France154.315.62
83Luis Arraez117.814.71
84Pete Alonso155.315.19
85Carlos Correa157.515.61
86Brian Anderson64.811.99
87Connor Joe51.315.92
88Kris Bryant143.815.54
89Willy Adames138.513.99
90Whit Merrifield17614.82
91J.P. Crawford169.314.22
92Mike Yastrzemski129.812.39
93Giancarlo Stanton143.314.95
94Max Muncy14516.13
95C.J. Cron132.515.65
96Brian Goodwin6710.98
97Ji-Man Choi75.812.9
98Raimel Tapia131.813.42
99Paul Goldschmidt167.517.14
100Jake Fraley6513.43
Sheet1
Cell Formulas
RangeFormula
F2:G2F2=LET(I,INDEX(SORT(B2:C100,2,-1),SEQUENCE(E1),{1,2}),CHOOSE({1,2},AVERAGE(INDEX(I,,1)),AVERAGE(INDEX(I,,2))))
Dynamic array formulas.


I've done it for the top 50, but just change the value in E1 to whatever you want.
 
Upvote 0
Thanks for that. How about
+Fluff 1.xlsm
ABCDEFG
1Full NameStrato ABsNERP OFF WGHT50Avg BAvg C
2Mike Trout3630.28113.20819.7382
3Bryce Harper14727.35
4Byron Buxton6226.33
5Jose Siri11.823.96
6Fernando Tatis Jr.13524.35
7Juan Soto161.822.9
8Brandon Belt93.322.07
9Jesse Winker11919.65
10Starling Marte127.521.66
11Vladimir Guerrero Jr.172.521.51
12Cedric Mullins II165.321.27
13Ronald Acuna Jr.86.523.19
14Kyle Schwarber115.820.82
15Brandon Lowe150.819.21
16Jared Walsh144.517.64
17Joey Votto131.319.41
18Rafael Devers163.319.39
19Brandon Nimmo94.820.41
20Brandon Crawford134.818.58
21Ramon Urias72.517.91
22Kyle Isbel20.818.64
23Mitch Garver59.518.74
24Frank Schwindel64.521.61
25Brett Phillips71.516.53
26J.D. Davis50.819.3
27Rafael Ortega81.516.03
28Michael Brantley125.518.05
29Thairo Estrada32.516.9
30Kyle Tucker139.819.73
31A.J. Pollock103.518.64
32Luis Robert72.36.91
33Alex Verdugo148.816.47
34Freddie Freeman171.317.84
35Tyler O'Neill13020.39
36Austin Riley160.517.76
37Riley Adams28.517.47
38Corey Seager100.319.23
39Santiago Espinal6118.96
40Nick Castellanos14318.43
41Adam Frazier156.317.71
42Tony Kemp95.517.87
43Bryan Reynolds158.518.88
44Xander Bogaerts147.817.49
45Will Smith11816.15
46Jason Castro43.514.77
47Myles Straw157.815.84
48Yoan Moncada15116.78
49Matt Olson163.318.81
50Marcus Semien179.516.05
51Shohei Ohtani158.318.45
52Alex Avila2713.6
53Nico Hoerner41.516.02
54Nicky Lopez136.516.81
55Mookie Betts133.517.09
56Matt Vierling18.817.53
57Yuli Gurriel147.317.3
58Travis Jankowski38.315.34
59Max Schrock33.312.12
60J.D. Martinez156.315.4
61Aaron Judge156.317.46
62Trea Turner15919.29
63Jonathan India150.816.67
64Jose Ramirez15616.1
65Yasmani Grandal91.517.88
66Josh Harrison13415.47
67Justin Turner148.515.25
68Kevin Kiermaier95.315.36
69Akil Baddoo114.513.85
70Brandon Marsh6414.43
71Zack Collins57.312.48
72Austin Meadows144.313.47
73George Springer8416.28
74Darin Ruf7717.15
75Jacob Stallings105.813.38
76Joey Gallo152.315.05
77Jose Altuve166.814.97
78Tyler Stephenson97.815.3
79Buster Posey112.817.28
80Jeimer Candelario155.515.26
81Tim Anderson137.315.62
82Ty France154.315.62
83Luis Arraez117.814.71
84Pete Alonso155.315.19
85Carlos Correa157.515.61
86Brian Anderson64.811.99
87Connor Joe51.315.92
88Kris Bryant143.815.54
89Willy Adames138.513.99
90Whit Merrifield17614.82
91J.P. Crawford169.314.22
92Mike Yastrzemski129.812.39
93Giancarlo Stanton143.314.95
94Max Muncy14516.13
95C.J. Cron132.515.65
96Brian Goodwin6710.98
97Ji-Man Choi75.812.9
98Raimel Tapia131.813.42
99Paul Goldschmidt167.517.14
100Jake Fraley6513.43
Sheet1
Cell Formulas
RangeFormula
F2:G2F2=LET(I,INDEX(SORT(B2:C100,2,-1),SEQUENCE(E1),{1,2}),CHOOSE({1,2},AVERAGE(INDEX(I,,1)),AVERAGE(INDEX(I,,2))))
Dynamic array formulas.


I've done it for the top 50, but just change the value in E1 to whatever you want.
And if column B and C are not right next to each other? I am assuming the Sort expression will break.

Also I am not familiar with LET function and am curious on what exactly it is doing. I kind of understand that it is renaming a formula/column to be reference easier? What would be the equivalent if you weren't using Let?
 
Last edited:
Upvote 0
Yup, can you post some more realistic data.
 
Upvote 0
And I edited my comment above, but I understand the basic of LET expression (so you can reference it later without selecting the columns/formulas(?)). Is it possible to not use that, so I can see exactly what is happening to learn a little bit better? If not I can try and recreate it without the LET myself.

So in this table we have Strato AB in column E and NERP OFF WEIGHT in column R. Would like to still do the same comparision as of above with the same output.

Thank you!

Data Example.xlsx
ABCDEFGHIJKLMNOPQR
1Full NameBatsPosPAsStrato ABsPer 30ABsBBsSBCSWARwRC+wOBAwOBA vs LwOBA vs RNERP vs lhp WGHTNERP vs rhp WGHTNERP OFF WGHT
2Mike TroutRCF146361.211727202.31900.4510.3460.4984.0526.2230.28
3Bryce HarperLRF5991474.94881001336.61700.4310.3560.4673.5323.8227.35
4Byron BuxtonRCF254622.0723513914.21690.4190.4180.4194.9921.3426.33
5Luis RobertRCF29672.32.4127514613.21570.3990.5090.3676.9115.5228.98
6Fernando Tatis Jr.RSS5461354.5478622546.11560.4030.3980.4044.4719.8824.35
7Jose SiriRCF4911.80.39461310.31600.4010.4490.3753.8620.123.96
8Ronald Acuna Jr.RRF36086.52.88297491764.21570.4120.440.4045.417.7923.19
9Juan SotoLRF654161.85.39502145976.61630.420.3720.4483.319.622.9
10Brandon BeltL1B38193.33.1132548323.31580.4060.3610.4173.3618.7122.07
11Starling MarteRCF526127.54.25467434755.51340.3640.3310.383.1818.4721.66
12Frank SchwindelR1B25964.52.1524216212.11520.4030.440.3875.4516.1721.61
13Vladimir Guerrero Jr.R1B698172.55.7560486416.71660.4190.4040.4243.5917.9221.51
14Cedric Mullins IILCF675165.35.51602593085.31360.3720.3390.3913.4317.8521.27
15Kyle SchwarberLLF471115.83.8639964113.11450.3920.3520.413.1117.7120.82
16Brandon NimmoLCF38694.83.1632554543.51370.3690.3720.3683.8316.5920.41
17Tyler O'NeillRLF5371304.33482381545.41450.3840.4250.3755.0315.3620.39
18Kyle TuckerLRF567139.84.66506531424.81470.3830.3780.3854.0515.6719.73
19Jesse WinkerLLF4851193.9742353103.21480.4030.2630.4491.0518.619.65
20Joey VottoL1B533131.34.3844877103.61400.3910.3080.432.117.3119.41
21Rafael DeversL3B664163.35.4459162554.71340.3730.3290.4012.5916.7919.39
22J.D. DavisR3B21150.81.6917924101.61300.3570.3050.3813.3215.9719.3
23Trea TurnerRSS6461595.3595413256.91420.3860.4770.3556.1113.1819.29
24Corey SeagerLSS409100.33.3435348113.71470.3890.390.3894.0115.2219.23
25Brandon LoweL2B615150.85.0353568715.21370.3630.2840.3991.5317.6819.21
26Santiago EspinalR3B246612.0322222612.21150.3440.3510.3393.7515.2118.96
27Bryan ReynoldsSCF646158.55.2855975525.51420.3850.3850.3854.2314.6518.88
28Matt OlsonL1B673163.35.44565884151460.3790.3980.3674.714.1218.81
29Mitch GarverRCA24359.51.9820731112.11370.3720.3120.4172.4616.2818.74
30A.J. PollockRLF422103.53.45384309131370.3750.3660.3793.115.5418.64
31Kyle IsbelLRF8320.80.69767200.41090.3330.3770.3252.3116.3318.64
32Brandon CrawfordLSS549134.84.49483561135.51390.3770.3080.4032.1716.4218.58
33Shohei OhtaniLRF639158.35.285379626105.11520.3930.3970.3914.513.9418.45
34Nick CastellanosRRF5851434.7753141314.21400.3910.3930.393.4714.9618.43
35Michael BrantleyLLF508125.54.1846933102.11230.3470.2520.3992.2215.8418.05
36Ramon UriasRSS29672.52.4226228121.61150.3410.3110.3641.5316.3817.91
37Yasmani GrandalSCA37591.53.0527987003.71590.4020.440.3894.9612.9217.88
38Tony KempL2B39795.53.1833052822.71270.3510.3410.3553.1514.7217.87
39Freddie FreemanL1B695171.35.7160085834.51350.3790.330.3982.4715.3717.84
40Ketel MarteSCF37492.83.0934031202.91390.3850.4820.3436.5111.2617.77
41Austin RileyR3B662160.55.3559052014.21350.3790.3220.3962.4115.3517.76
42Adam FrazierL2B639156.35.21577481053.41140.3410.3290.3452.8914.8317.71
43Jared WalshL1B585144.54.8253048212.81270.3570.2410.4150.0617.5817.64
44Matt VierlingR1B7718.80.63714200.51210.3560.3350.3824.0213.5117.53
45Xander BogaertsRSS603147.84.9352962515.21300.3680.3550.3752.9814.5117.49
46Riley AdamsRCA12028.50.9599150001050.3320.3010.3552.2415.2417.47
47Aaron JudgeRRF633156.35.2155075615.51480.3870.4150.3754.2413.2117.46
48Yuli GurrielR1B605147.34.9153059113.41340.3630.3890.353.8413.4617.3
49Buster PoseyRCA454112.83.7639556004.91400.3790.4310.3614.9412.3517.28
50Darin RufR1B312772.5726246202.51440.3840.4190.3574.4512.717.15
51Paul GoldschmidtR1B679167.55.58603671204.91380.3730.4440.3555.2911.8617.14
52Mookie BettsRRF550133.54.45466681053.91310.3650.3670.3653.513.617.09
53Thairo EstradaRSS13232.51.081219100.91190.3460.2910.3911.1215.7916.9
54Nicky LopezLSS565136.54.55497492214.41060.3290.3080.3363.1113.716.81
55Yoan MoncadaS3B6161515.0352084324.51220.3470.3140.3582.514.2816.78
56Wander FrancoSSS30876.32.5428124212.51270.3480.4290.3034.8811.8116.69
57Jonathan IndiaR2B631150.85.03532711233.91220.3630.3610.3633.4913.1716.67
58Brett PhillipsLCF29271.52.38253331431.81030.3130.180.3650.541616.53
59Alex VerdugoLLF604148.84.96544516221070.3340.2460.3781.0215.4616.47
60George SpringerRCF342842.829937412.41400.3810.4010.3743.5212.7616.28
61Will SmithRCA5011183.9341458304.61300.3640.3070.3851.7314.4216.15
62Max MuncyL1B5921454.8349783214.91400.3790.4060.3694.2211.916.13
63Jose RamirezS3B6361565.2552722746.31370.3720.3680.3743.0613.0416.1
64Marcus SemienR2B724179.55.98652661516.61310.3680.3340.381.9814.0616.05
65Rafael OrtegaLCF33081.52.72296301261.61200.3550.2220.3830.1715.8616.03
66Nico HoernerR2B17041.51.3814917530.81040.330.2870.3492.2413.7716.02
67Connor JoeRLF21151.31.7117926001.41160.3660.3940.3553.912.0215.92
Sheet2
 
Upvote 0
Thanks for that.
Try
Excel Formula:
=LET(I,INDEX(SORT(E2:R1000,14,-1),SEQUENCE(S1),SEQUENCE(,14)),CHOOSE({1,2},AVERAGE(INDEX(I,,1)),AVERAGE(INDEX(I,,14))))
and without LET
Excel Formula:
=CHOOSE({1,2},AVERAGE(INDEX(INDEX(SORT(E2:R1000,14,-1),SEQUENCE(S1),SEQUENCE(,14)),,1)),AVERAGE(INDEX(INDEX(SORT(E2:R1000,14,-1),SEQUENCE(S1),SEQUENCE(,14)),,14)))
Cell S1 holds the number of rows to be averaged.
The LET function allows you to store the value of a calculation in a variable, so that it's only calculated once, rather than multiple times.
 
Upvote 0

Forum statistics

Threads
1,215,020
Messages
6,122,712
Members
449,093
Latest member
Mnur

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
Back
Top