Sum of Lowest Rankings

Celticshadow

Active Member
Joined
Aug 16, 2010
Messages
419
Office Version
  1. 365
Platform
  1. Windows
Hi Forum

I have as attached in the google sheets link

column A is the race id
column B which lists horses names
column C I have the starting price odds of said horses
column D I have the rank of those Starting price odds
column E I have the finishing position of those horses

What I would like if possible is (with a formula) to put in column F the sum of the two smallest ranks from column D that would be taken from the first 3 finishing positions in column E.

Thus

first pos is 1 and its coinciding Price rank is 4
second pos is 2 and its coinciding Price rank is 5
third pos is 3 and its coinciding Price rank is 9

Therefore 4 and 5 need to summed which equals 9 and placed in column D.


Many thanks for looking and I look forward to any help forum may be able to give me.



Regards
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Is this for Excel or Google Sheets?
 
Upvote 0
Hi Fluff

This is for excel I was just using google sheets to show an example. My apologies.

Regards
 
Upvote 0
Ok, how about
Excel Formula:
=SUM(TAKE(SORT(D2:E14,{2,1}),2,1))
 
Upvote 0
Scrub that formula it's wrong, try
Excel Formula:
=SUM(TAKE(SORT(FILTER(D2:D14,E2:E14<=3)),2))
 
Upvote 0
Hi Fluff


Many thanks for replying it is much appreciated and your formula works a treat. However I stupidly have not explained myself fully and it is my own fault. The eg I have shown is only partial and the sheet extends through a number of races and so I have updated the sheets doc to reflect this, thus I would require a sum for each individual race as indicated by the race id.Please note that the actual sheet extends through from Race id 1 to Race id 40,000 and counting.


I hope that is a little clearer and I apologise for the confusion I have caused.


Regards
 
Upvote 0
How about
Sum Lowest Ranks(1).xlsx
ABCDEFGH
1Race IDHorseStarting PriceStarting Price RankFinishing PosRaceTop 3 sum
21Parga Diamond8.634119
31Diamond Tipp185225
41Music Of Life289333
51Belle Le Grand21.9374
61Whitewinewednesday8.635
71Joshuas Daylami18.8166
81El Fabienne3.0517
91Angels Peak220138
101Maries March5.929
111Annie Hope Harriet25.23810
121Koo Star81.921111
131Keep It Cool36.91012
141Slyguff Storm100.541213
152Jollie Cosmos9.0051
162Lake Chad3.0022
172Natural Breeze6.0033
182Smitty Bacall7.0044
192Room To Roam2.0015
202The Abbey10.0066
212Elegant Dan12.0077
222Balinaboola Steel14.0088
233A Penny A Hundred1.5011
243Costanuci5.0042
253Miss Agusta3.0023
263Presenting Doyen4.0034
273Miss Tempo10.0055
Sheet1
Cell Formulas
RangeFormula
G2:G4G2=UNIQUE(TOCOL(A2:A100,1))
H2:H4H2=SUM(TAKE(SORT(FILTER($D$2:$D$100,($E$2:$E$100<=3)*($A$2:$A$100=G2))),2))
Dynamic array formulas.
 
Upvote 0
Hi Fluff

Many thanks for replying it is much appreciated. Although that works it is not quite what I was looking for in that I was hoping a formula could be put in Column F and then copied all the way down through all the races as in the google sheets eg so that each id in col A had its top 3 sum in column F. Once again many thanks for looking.

Regards
 
Upvote 0
Ok, how about
Sum Lowest Ranks(1).xlsx
ABCDEF
1Race IDHorseStarting PriceStarting Price RankFinishing Pos
21Parga Diamond8.63419
31Diamond Tipp18529
41Music Of Life28939
51Belle Le Grand21.93749
61Whitewinewednesday8.6359
71Joshuas Daylami18.81669
81El Fabienne3.05179
91Angels Peak2201389
101Maries March5.9299
111Annie Hope Harriet25.238109
121Koo Star81.9211119
131Keep It Cool36.910129
141Slyguff Storm100.5412139
152Jollie Cosmos9.00515
162Lake Chad3.00225
172Natural Breeze6.00335
182Smitty Bacall7.00445
192Room To Roam2.00155
202The Abbey10.00665
212Elegant Dan12.00775
222Balinaboola Steel14.00885
233A Penny A Hundred1.50113
243Costanuci5.00423
253Miss Agusta3.00233
263Presenting Doyen4.00343
273Miss Tempo10.00553
28
Sheet1
Cell Formulas
RangeFormula
F2:F27F2=MAP(TOCOL(A2:A100,1),LAMBDA(m,SUM(TAKE(SORT(FILTER($D$2:$D$100,($E$2:$E$100<=3)*($A$2:$A$100=m))),2))))
Dynamic array formulas.
 
Upvote 0
Solution
Hi Fluff

Wow what can I say, that is a fantastic solution that works superbly well and I am so grateful for your time and expertise, many thanks.

Regards
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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