Multiple with same %, need 2nd & 3rd

gtd526

Well-known Member
Joined
Jul 30, 2013
Messages
657
Office Version
  1. 2019
Platform
  1. Windows
Hello,
If you have multiple of the same % (T:T), how do you retrieve the 2nd and 3rd name (S:S) of the same %?
Looking to fill S:S.
Im using the following:
thank you

Cell Formulas
RangeFormula
S8:S18S8=INDEX($N$7:$N$36,MATCH(T8,$Q$7:$Q$36,0),1)
T8T8=MAX($Q$7:$Q$36)
U8:U18U8=COUNTIF($Q$7:$Q$36,T8)
T9T9=LARGE($Q$7:$Q$36,2)
T10T10=LARGE($Q$7:$Q$36,3)
T11T11=LARGE($Q$7:$Q$36,4)
T12T12=LARGE($Q$7:$Q$36,5)
T13T13=LARGE($Q$7:$Q$36,6)
T14T14=LARGE($Q$7:$Q$36,7)
T15T15=LARGE($Q$7:$Q$36,8)
T16T16=LARGE($Q$7:$Q$36,9)
T17T17=LARGE($Q$7:$Q$36,10)
T18T18=LARGE($Q$7:$Q$36,11)
 
When I copy your results to a new workbook, it looks great, the same results. But when I apply the formula's you recommended, I get odd results. The N:N contains a formula to get the results of Teams I've bet (H:H).
Maybe the formula in N:N is messing things up? When I copy/paste sv on N:N, I get the correct results. I didn't do anything to O,P,Q.
Is there a way to add new teams to the list in N:N, assuming I copy/paste sv of the existing list? Meaning to add teams to N31,N32,N33, etc.
The list in N:N is created from column H:H, as indicated in N:N formula. Hopefully this makes "some" sense. Here is part of the worksheet do to size (if needed).

Wagers.xlsm
ABCDEFGHIJKLMNOPQRSTU
1StatusDate Balance League Risk To Win My TeamOppSPRD$$$
2$ 86.02
3W8/6NBASPRD$ 5.00$ 4.55MILMIA-9$ 4.55Unique:23INDEX(F16:H18,MATCH(50,G16:G29,0),1)
4$ 4.55+1 for blank
5$ 90.57BalanceBest Betting Teams
6L8/7NBASPRD$ 5.00$ 4.55OKCMEM-4$ (5.00)TeamWLW %TeamMAXCount %
7$ (5.00)BRK1150%ATL100%2
8$ 85.57BalanceUTA4267%MIA100%2
9L8/8NBASPRD$ 5.00$ 4.55MILDAL-5.5$ (5.00)BOS2250%CHA80%1
10$ (5.00)SAC010%PHX75%2
11$ 80.57BalanceCHA4180%UTA75%2
12W8/9NBASPRD$ 5.00$ 4.55TORMEM-6.5$ 4.55MIL3633%UTA67%2
13$ 4.55GS2167%BRK67%3
14$ 85.12BalanceATL10100%BRK50%4
15L8/11NBASPRD$ 5.00$ 4.55DALPOR2$ (5.00)MEM1150%BOS50%5
16$ (5.00)OKC020%MEM50%4
17$ 80.12BalanceLAC1325%MIL33%1
18L8/12NBASPRD$ 5.00$ 4.55TORPHI-6.5$ (5.00)PHX3175%SAC33%1
19$ (5.00)WAS020%SAC25%1
20$ 75.12BalanceIND020%SAC0%10
21L8/20NBASPRD$ 5.00$ 4.55ORLMIL12.5$ (5.00)CHI010%OKC0%10
22$ (5.00)DEN020%WAS0%10
23$ 70.12BalanceLAL3175%IND0%9
24W8/21NBASPRD$ 5.00$ 4.55BOSPHI-6.5$ 4.55MIN010%CHI0%10
25$ 4.55TOR2250%DEN0%10
26$ 74.67BalanceMIA20100%MIN0%10
27L8/22NBASPRD$ 5.00$ 4.55HOUOKC-2$ (5.00)ORL010%ORL0%10
28$ (5.00)HOU010%HOU0%10
29$ 69.67Balance 00 #NUM!#NUM!0
30W8/23NBASPRD$ 5.00$ 4.55TORBKR-12$ 4.55DAL010%#NUM!#NUM!0
31$ 4.55
32$ 74.22Balance
33W8/24NBASPRD$ 5.00$ 4.55MIAIND-6$ 4.55
34$ 4.55
35$ 78.77Balance
36L8/25NBASPRD$ 5.00$ 4.55UTADEN-3$ (5.00) 
37$ (5.00)
38$ 73.77Balance
NBA
Cell Formulas
RangeFormula
O3O3=SUMPRODUCT(1/COUNTIF(H3:H141,H3:H141&""))
K3,K36,K33,K30,K27,K24,K21,K18,K15,K12,K9,K6K3=SUMIF(A3,"W",G3)+SUMIF(A3,"L",F3)*-1
K4,K37,K34,K31,K28,K25,K22,K19,K16,K13,K10,K7K4=SUM(K3:K3)
C5,C38,C35,C32,C29,C26,C23,C20,C17,C14,C11,C8C5=C2+K4
N7:N30N7=IFERROR(LOOKUP(2, 1/((COUNTIF($N$7:N7,$H$3:$H$499)=0)*($H$3:$H$499<>"")),$H$3:$H$499),"")
O7:O30O7=COUNTIFS($A$3:$A$999,"W",$H$3:$H$999,N7)
P7:P30P7=COUNTIFS($A$3:$A$999,"L",$H$3:$H$999,N7)
Q36,Q7:Q30Q7=IFERROR(O7/(O7+P7),"")
S7:S30S7=INDEX($N$7:$N$30,AGGREGATE(15,6,(ROW($N$7:$N$30)-ROW($N$7)+1)/($Q$7:$Q$30=T7),COUNTIFS(T$7:T7,T7)))
T7:T30T7=LARGE($Q$7:$Q$30,ROWS(T$7:T7))
U7:U30U7=COUNTIF($Q$7:$Q$30,T7)
Here are the results after paste sv...
Cell Formulas
RangeFormula
O7:O30O7=COUNTIFS($A$3:$A$999,"W",$H$3:$H$999,N7)
P7:P30P7=COUNTIFS($A$3:$A$999,"L",$H$3:$H$999,N7)
Q7:Q30Q7=IFERROR(O7/(O7+P7),"")
S7:S30S7=INDEX($N$7:$N$30,AGGREGATE(15,6,(ROW($N$7:$N$30)-ROW($N$7)+1)/($Q$7:$Q$30=T7),COUNTIFS(T$7:T7,T7)))
T7:T30T7=LARGE($Q$7:$Q$30,ROWS(T$7:T7))
U7:U30U7=COUNTIF($Q$7:$Q$30,T7)

You have circular references, which is why you are getting problems, change the formula in N7 to
Excel Formula:
=IFERROR(LOOKUP(2, 1/((COUNTIF($N$6:N6,$H$3:$H$499)=0)*($H$3:$H$499<>"")),$H$3:$H$499),"")
Perfection! Thanks for the formula.
What is the Circular reference in the previous formula?
Here are the results:
Cell Formulas
RangeFormula
O7:O30O7=COUNTIFS($A$3:$A$998,"W",$H$3:$H$998,N7)
P7:P30P7=COUNTIFS($A$3:$A$998,"L",$H$3:$H$998,N7)
Q7:Q30Q7=IFERROR(O7/(O7+P7),"")
S7:S30S7=INDEX($N$7:$N$30,AGGREGATE(15,6,(ROW($N$7:$N$30)-ROW($N$7)+1)/($Q$7:$Q$30=T7),COUNTIFS(T$7:T7,T7)))
T7:T30T7=LARGE($Q$7:$Q$30,ROWS(T$7:T7))
U7:U30U7=COUNTIF($Q$7:$Q$30,T7)
N7:N33N7=IFERROR(LOOKUP(2, 1/((COUNTIF($N$6:N6,$H$3:$H$499)=0)*($H$3:$H$499<>"")),$H$3:$H$499),"")
 
Upvote 0

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
You had
Rich (BB code):
COUNTIF($N$7:N7,$H$3:$H$499)=0)
so N7 was counting itself, which is a circular reference.
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,668
Members
448,977
Latest member
moonlight6

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