Index, match with large function (two step) with multiple criteria pulling wrong record

mclary

New Member
Joined
Oct 2, 2017
Messages
3
I have a spreadsheet that is supposed to find the top three players that meet two criteria (position (set in cell $K$4) and salary (set in cell $K$5) (less than or equal to a desired amount) that have the highest projected points.

My first formula seems to work. This finds the highest three average projections based on the two criteria set forth above. The formula is:

in cell L7: {=LARGE(IF(Price_List[Pos]=$K$4,IF(Price_List[Salary]<=$K$5,Price_List[Avg Projection])),I7)}

My next formula which is supposed to pull the corresponding player's name is not working. It pulls the first record in the list whose average projection matches the value that my first formula pulled). I need to make it find the player that matches the avg projection value determined in the first formula but also matches the position and salary criteria. I am using an index match as follows:

in cell J7: =INDEX(Price_List[Player],MATCH(L7,Price_List[Avg Projection],0))

I tried to paste the spreadsheet below but it is pretty ugly.

Can anyone help me figure out what the second formula should be?


[TABLE="width: 866"]
<colgroup><col><col><col><col><col><col><col span="7"></colgroup><tbody>[TR]
[TD]Player[/TD]
[TD]o[/TD]
[TD]Pos[/TD]
[TD]Matchup[/TD]
[TD]Salary[/TD]
[TD]Avg Projection[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]QB1[/TD]
[TD]o[/TD]
[TD]QB[/TD]
[TD]N/A[/TD]
[TD]7700[/TD]
[TD]21.47[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]QB20[/TD]
[TD]o[/TD]
[TD]QB[/TD]
[TD]N/A[/TD]
[TD]5500[/TD]
[TD]17.77[/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 4"]Salary Optimizer[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]QB30[/TD]
[TD]o[/TD]
[TD]QB[/TD]
[TD]N/A[/TD]
[TD]4700[/TD]
[TD]16.10[/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD]Position[/TD]
[TD]WR[/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
[TR]
[TD]RB3[/TD]
[TD]o[/TD]
[TD]RB[/TD]
[TD]N/A[/TD]
[TD]8000[/TD]
[TD]19.93[/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD]Salary[/TD]
[TD]$7,000[/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
[TR]
[TD]RB4[/TD]
[TD]o[/TD]
[TD]RB[/TD]
[TD]N/A[/TD]
[TD]7700[/TD]
[TD]19.77[/TD]
[TD][/TD]
[TD][/TD]
[TD]Rank[/TD]
[TD]Name[/TD]
[TD]Salary[/TD]
[TD]Avg Projection[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]RB35[/TD]
[TD]o[/TD]
[TD]RB[/TD]
[TD]N/A[/TD]
[TD]4500[/TD]
[TD]10.70[/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD]QB20[/TD]
[TD="align: right"]$5,500[/TD]
[TD="align: right"]17.8[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]RB36[/TD]
[TD]o[/TD]
[TD]RB[/TD]
[TD]N/A[/TD]
[TD]4500[/TD]
[TD]11.80[/TD]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[TD]WR24[/TD]
[TD="align: right"]$5,900[/TD]
[TD="align: right"]16.1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]RB37[/TD]
[TD]o[/TD]
[TD]RB[/TD]
[TD]N/A[/TD]
[TD]4500[/TD]
[TD]5.33[/TD]
[TD][/TD]
[TD][/TD]
[TD]3[/TD]
[TD]WR30[/TD]
[TD="align: right"]$5,600[/TD]
[TD="align: right"]15.9[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]RB66[/TD]
[TD]o[/TD]
[TD]RB[/TD]
[TD]N/A[/TD]
[TD]3800[/TD]
[TD]2.80[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]RB67[/TD]
[TD]o[/TD]
[TD]RB[/TD]
[TD]N/A[/TD]
[TD]3800[/TD]
[TD]6.37[/TD]
[TD][/TD]
[TD="colspan: 2"]Projection Formula[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]WR20[/TD]
[TD]o[/TD]
[TD]WR[/TD]
[TD]N/A[/TD]
[TD]6300[/TD]
[TD]15.53[/TD]
[TD][/TD]
[TD="colspan: 6"]{=LARGE(IF(Price_List[Pos]=$K$4,IF(Price_List[Salary]<=$K$5,Price_List[Avg Projection])),I7)}[/TD]
[/TR]
[TR]
[TD]WR21[/TD]
[TD]o[/TD]
[TD]WR[/TD]
[TD]N/A[/TD]
[TD]6200[/TD]
[TD]17.77[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]WR22[/TD]
[TD]o[/TD]
[TD]WR[/TD]
[TD]N/A[/TD]
[TD]6100[/TD]
[TD]13.43[/TD]
[TD][/TD]
[TD="colspan: 2"]Name Formula[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]WR23[/TD]
[TD]o[/TD]
[TD]WR[/TD]
[TD]N/A[/TD]
[TD]6000[/TD]
[TD]3.50[/TD]
[TD][/TD]
[TD="colspan: 6"]=INDEX(Price_List[Player],MATCH(L7,Price_List[Avg Projection],0))[/TD]
[/TR]
[TR]
[TD]WR24[/TD]
[TD]o[/TD]
[TD]WR[/TD]
[TD]N/A[/TD]
[TD]5900[/TD]
[TD]16.13[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]WR29[/TD]
[TD]o[/TD]
[TD]WR[/TD]
[TD]N/A[/TD]
[TD]5700[/TD]
[TD]13.83[/TD]
[TD][/TD]
[TD="colspan: 2"]Salary Formula[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]WR30[/TD]
[TD]o[/TD]
[TD]WR[/TD]
[TD]N/A[/TD]
[TD]5600[/TD]
[TD]15.90[/TD]
[TD][/TD]
[TD="colspan: 6"]=INDEX(Price_List[Salary],MATCH(J7,Price_List[Player],0))[/TD]
[/TR]
[TR]
[TD]TE1[/TD]
[TD]o[/TD]
[TD]TE[/TD]
[TD]N/A[/TD]
[TD]6800[/TD]
[TD]15.17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TE2[/TD]
[TD]o[/TD]
[TD]TE[/TD]
[TD]N/A[/TD]
[TD]6000[/TD]
[TD]15.60[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TE3[/TD]
[TD]o[/TD]
[TD]TE[/TD]
[TD]N/A[/TD]
[TD]5400[/TD]
[TD]12.07[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TE4[/TD]
[TD]o[/TD]
[TD]TE[/TD]
[TD]N/A[/TD]
[TD]5000[/TD]
[TD]13.37[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TE5[/TD]
[TD]o[/TD]
[TD]TE[/TD]
[TD]N/A[/TD]
[TD]4600[/TD]
[TD]2.27[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TE6[/TD]
[TD]o[/TD]
[TD]TE[/TD]
[TD]N/A[/TD]
[TD]4500[/TD]
[TD]12.90[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Def1[/TD]
[TD]o[/TD]
[TD]D[/TD]
[TD]N/A[/TD]
[TD]3900[/TD]
[TD]11.07[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Def2[/TD]
[TD]o[/TD]
[TD]D[/TD]
[TD]N/A[/TD]
[TD]3800[/TD]
[TD]12.60[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Def3[/TD]
[TD]o[/TD]
[TD]D[/TD]
[TD]N/A[/TD]
[TD]3700[/TD]
[TD]10.93[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Def4[/TD]
[TD]o[/TD]
[TD]D[/TD]
[TD]N/A[/TD]
[TD]3600[/TD]
[TD]9.70[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Def5[/TD]
[TD]o[/TD]
[TD]D[/TD]
[TD]N/A[/TD]
[TD]3500[/TD]
[TD]10.17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Maybe something like this.
These are array formulas and must be entered with CTRL-SHIFT-ENTER.
Excel Workbook
ABCDEFGHIJKL
1PlayeroPosMatchupSalaryAvg Projection
2QB1oQBN/A770021.47
3QB20oQBN/A550017.77Salary Optimizer
4QB30oQBN/A470016.1PositionWR
5RB3oRBN/A800019.93Salary$7,000
6RB4oRBN/A770019.77RankNameSalaryAvg Projection
7RB35oRBN/A450010.71WR21620017.77
8RB36oRBN/A450011.82WR24590016.13
9RB37oRBN/A45005.333WR30560015.9
10RB66oRBN/A38002.8
11RB67oRBN/A38006.37
12WR20oWRN/A630015.53
13WR21oWRN/A620017.77
14WR22oWRN/A610013.43
15WR23oWRN/A60003.5
16WR24oWRN/A590016.13
17WR29oWRN/A570013.83
18WR30oWRN/A560015.9
19TE1oTEN/A680015.17
20TE2oTEN/A600015.6
21TE3oTEN/A540012.07
22TE4oTEN/A500013.37
23TE5oTEN/A46002.27
24TE6oTEN/A450012.9
25Def1oDN/A390011.07
26Def2oDN/A380012.6
27Def3oDN/A370010.93
28Def4oDN/A36009.7
29Def5oDN/A350010.17
Sheet
 
Upvote 0
Thanks, everything worked except the formula in K7 was missing the third "if" criteria for salary. I adjusted that and everything worked. Thanks for your help.
 
Upvote 0

Forum statistics

Threads
1,223,902
Messages
6,175,278
Members
452,629
Latest member
SahilPolekar

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