Aggregate function assistance or some other function?

cspengel

Board Regular
Joined
Oct 29, 2022
Messages
173
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
So basically I need the lowest values in column Y for every name in A38:A58 that occurs in the rows of columns H:K based on the number next to the name in column C ( row 38-row 58).

The column this formula would be in is column N.
For each row that contains the name, and if the row contains one of the lowest values, an "x" will appear in column N.

I tried using
VBA Code:
=IF(Y2<=AGGREGATE(15,6,$Y$2:$Y$1500/($H$2:$K$1500=H2),VLOOKUP(H2,$A$38:$C$58,3,0)),"x","")

However that did not quite work right as I am not sure you can use a four column range with aggregate? Thanks for any assistance!

correlationrandom1(in_progress)5(USE4FORNOW)REVISION5.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXY
1QBFLEXFLEXFLEXFLEXQBFLEXFLEXFLEXFLEXComboIDSelection MVPSelection FlexSalaryProjectionFloor ProjectionCeiling Projection↑^ DifferenceTargetDepth TotalTARGET PT 12+Ownership L|UCorrelationValue↓
2Justin HerbertJustin HerbertJustin HerbertJustin HerbertJustin HerbertNick FolesJustin HerbertMichael Pittman Jr.Cameron DickerJoshua Kelley101265  5900064.30543.586.52.771261.53630.99%1.095.151233211
3Austin EkelerAustin EkelerAustin EkelerAustin EkelerAustin EkelerJustin HerbertNick FolesMichael Pittman Jr.Cameron DickerJoshua Kelley16215  5900068.2449.5932.7683566.225630.99%1.095.339626068
4Keenan AllenKeenan AllenKeenan AllenKeenan AllenKeenan AllenNick FolesAustin EkelerMichael Pittman Jr.Cameron DickerJoshua Kelley105990  5950061.15539.586.52.766258.57630.47%0.774.921005939
5Nick FolesNick FolesNick FolesNick FolesNick FolesAustin EkelerNick FolesMichael Pittman Jr.Cameron DickerJoshua Kelley49290  5950063.5154294.52.7608561.785630.47%0.774.994285159
6Mike WilliamsMike WilliamsMike WilliamsMike WilliamsMike WilliamsMike WilliamsJustin HerbertNick FolesCameron DickerGerald Everett133391  6000069.11461032.757766.25631.30%1.525.616107096
7Deon JacksonDeon JacksonDeon JacksonDeon JacksonDeon JacksonNick FolesJustin HerbertMike WilliamsCameron DickerGerald Everett100631  6000069.22547.51022.766866.2631.30%1.525.570064239
8Michael Pittman Jr.Michael Pittman Jr.Michael Pittman Jr.Michael Pittman Jr.Michael Pittman Jr.Nick FolesJustin HerbertMichael Pittman Jr.DeAndre CarterCameron Dicker101350  5950063.83547.594.52.769363.64830.02%1.915.044947497
9Zack MossZack MossZack MossNick FolesJustin HerbertMichael Pittman Jr.DeAndre CarterChase McLaughlin101349  6000064.63541.5952.763361.59830.02%1.915.076409485
10Chase McLaughlinChase McLaughlinChase McLaughlinMike WilliamsJustin HerbertNick FolesCameron DickerAlec Pierce133394  5950067.0747100.52.743166.1831.04%1.915.415886508
11Cameron DickerCameron DickerCameron DickerNick FolesJustin HerbertMike WilliamsCameron DickerAlec Pierce100634  5950067.18548.5100.52.752266.05831.04%1.915.369843651
12Gerald EverettGerald EverettGerald EverettMike WilliamsJustin HerbertNick FolesChase McLaughlinAlec Pierce133379  6000067.87421042.737164.05831.20%1.915.447348496
13Joshua PalmerJoshua PalmerJoshua PalmerNick FolesJustin HerbertMike WilliamsChase McLaughlinAlec Pierce100619  6000067.98540.5100.52.746264831.20%1.915.401305639
14Parris CampbellParris CampbellParris CampbellJustin HerbertNick FolesMichael Pittman Jr.DeAndre CarterCameron Dicker16300  5950067.775498.52.7664568.335830.02%1.915.233340354
15Alec PierceAlec PierceAlec PierceJustin HerbertNick FolesMichael Pittman Jr.DeAndre CarterChase McLaughlin16299  6000068.575098.52.7604566.285830.02%1.915.264802342
16Indianapolis ColtsJoshua KelleyJoshua KelleyNick FolesKeenan AllenMichael Pittman Jr.Chase McLaughlinCameron Dicker110695  5900061.80536.585.52.773456.49530.05%0.895.197576152
17DeAndre CarterKeenan AllenNick FolesMichael Pittman Jr.Chase McLaughlinCameron Dicker82345  5900061.8738.586.52.770156.76530.05%0.895.219441231
18Donald Parham Jr.Mike WilliamsNick FolesMichael Pittman Jr.Chase McLaughlinCameron Dicker148495  5800061.333090.52.752756.1630.04%0.895.291974565
19Jelani WoodsNick FolesMike WilliamsMichael Pittman Jr.Chase McLaughlinCameron Dicker120145  5800061.4453387.52.761856.05630.04%0.895.245931707
20Los Angeles ChargersMike WilliamsJustin HerbertMichael Pittman Jr.Chase McLaughlinCameron Dicker134320  6000069.2421002.74765.49630.05%0.895.668760279
21Indianapolis ColtsNick FolesKeenan AllenMichael Pittman Jr.Cameron DickerGerald Everett110711  5800059.43540.589.52.780555.71530.55%1.075.04036253
22Ashton DulinKeenan AllenNick FolesMichael Pittman Jr.Cameron DickerGerald Everett82361  5800059.539.585.52.777255.98530.55%1.075.062227609
23Nick FolesKeenan AllenMichael Pittman Jr.Chase McLaughlinGerald Everett110696  5850060.2353790.52.774553.66530.63%0.895.071824518
24Keenan AllenNick FolesMichael Pittman Jr.Chase McLaughlinGerald Everett82346  5850060.336.5882.771253.93530.63%0.895.093689597
25Mike WilliamsNick FolesMichael Pittman Jr.Cameron DickerGerald Everett148511  5700058.9634922.759855.32630.49%1.075.134760942
26Entries150Nick FolesMike WilliamsMichael Pittman Jr.Cameron DickerGerald Everett120161  5700059.07531.589.52.768955.27630.49%1.075.088718085
27Mike WilliamsNick FolesMichael Pittman Jr.Chase McLaughlinGerald Everett148496  5750059.7629.5882.753853.27630.57%0.895.166222931
28MVPNumberOfLineUps#OfLineUpsToTake%OfLineUpsToTakeNick FolesMike WilliamsMichael Pittman Jr.Chase McLaughlinGerald Everett120146  5750059.87532.590.52.762953.22630.57%0.895.120180073
29Justin Herbert228300.2Mike WilliamsJustin HerbertMichael Pittman Jr.Chase McLaughlinGerald Everett134321  5950067.6339.51002.748162.66630.62%1.125.543008645
30Austin Ekeler223300.2Keenan AllenJustin HerbertMichael Pittman Jr.Cameron DickerGerald Everett68186  6000067.3750.596.52.771565.37530.60%1.155.439013323
31Keenan Allen255300.2Mike WilliamsJustin HerbertMichael Pittman Jr.Cameron DickerGerald Everett134336  5900066.83441032.754164.71630.54%1.155.511546657
32Nick Foles266300.2Justin HerbertKeenan AllenMichael Pittman Jr.Cameron DickerGerald Everett11486  6000071.2455101.52.7719569.795530.60%1.155.605541101
33Mike Williams290300.2Justin HerbertMike WilliamsMichael Pittman Jr.Cameron DickerGerald Everett20936  5900070.8852106.52.7603569.355630.54%1.155.653896657
34Deon Jackson0300.2Nick FolesKeenan AllenMichael Pittman Jr.DeAndre CarterChase McLaughlin110799  5750056.8953688.52.762452.74830.01%0.874.74335393
35Michael Pittman Jr.0300.2Keenan AllenNick FolesMichael Pittman Jr.DeAndre CarterChase McLaughlin82449  5750056.9635.583.52.759153.01830.01%0.874.765219009
36Mike WilliamsNick FolesMichael Pittman Jr.DeAndre CarterChase McLaughlin148599  5650056.4228912.741752.35930.01%0.874.837752342
37FLEXNumberOfLineUps#OfLineUpsToTake%OfLineUpsToTakeNick FolesKeenan AllenMichael Pittman Jr.Chase McLaughlinJoshua Palmer110697  6000060.01533.584.52.76853.2730.20%0.874.91835393
38Justin Herbert282300.2Nick FolesMike WilliamsMichael Pittman Jr.DeAndre CarterChase McLaughlin120249  5650056.53529.589.52.750852.3930.01%0.874.791709485
39Austin Ekeler228300.2Keenan AllenNick FolesMichael Pittman Jr.Chase McLaughlinJoshua Palmer82347  6000060.0835.585.52.764753.47730.20%0.874.940219009
40Keenan Allen339300.2Mike WilliamsNick FolesMichael Pittman Jr.Chase McLaughlinJoshua Palmer148497  5900059.5425902.747352.81830.18%0.875.012752342
41Nick Foles354300.2Nick FolesMike WilliamsMichael Pittman Jr.Chase McLaughlinJoshua Palmer120147  5900059.65529.588.52.756452.76830.18%0.874.966709485
42Mike Williams379300.2Mike WilliamsKeenan AllenNick FolesChase McLaughlinParris Campbell142828  5850060.5129942.744755.13730.56%0.875.081376274
43Deon Jackson92300.2Nick FolesKeenan AllenMike WilliamsChase McLaughlinParris Campbell110068  5850060.6253291.52.753855.08730.56%0.875.035333417
44Michael Pittman Jr.513300.2Keenan AllenNick FolesMike WilliamsChase McLaughlinParris Campbell81718  5850060.6936942.750555.35730.56%0.875.057198496
45Zack Moss62300.2Mike WilliamsKeenan AllenNick FolesChase McLaughlinAlec Pierce142829  5750060.1333.5952.736255.2830.62%0.875.114292941
46Chase McLaughlin419300.2Nick FolesKeenan AllenMike WilliamsChase McLaughlinAlec Pierce110069  5750060.24530.589.52.745355.15830.62%0.875.068250084
47Cameron Dicker453300.2Keenan AllenNick FolesMike WilliamsChase McLaughlinAlec Pierce81719  5750060.3136912.74255.42830.62%0.875.090115163
48Gerald Everett128300.2Mike WilliamsJustin HerbertMichael Pittman Jr.Cameron DickerParris Campbell134338  5950065.1740103.52.74864.49730.39%0.875.278409402
49Joshua Palmer71300.2Keenan AllenJustin HerbertMichael Pittman Jr.Cameron DickerAlec Pierce68189  5950065.335296.52.756965.22730.48%0.875.238792735
50Parris Campbell102300.2Mike WilliamsJustin HerbertMichael Pittman Jr.Cameron DickerAlec Pierce134339  5850064.7945101.52.739564.56830.43%0.875.311326068
51Alec Pierce153300.2Justin HerbertKeenan AllenMichael Pittman Jr.Cameron DickerAlec Pierce11489  5950069.255101.52.7573569.645730.48%0.875.405320513
52Joshua Kelley170300.2Justin HerbertMike WilliamsMichael Pittman Jr.Cameron DickerParris Campbell20938  5950069.2251106.52.7542569.135730.39%0.875.420759402
53DeAndre Carter96300.2Justin HerbertMike WilliamsMichael Pittman Jr.Cameron DickerAlec Pierce20939  5850068.8453104.52.7457569.205830.43%0.875.453676068
54Donald Parham Jr.117300.2Nick FolesJustin HerbertKeenan AllenChase McLaughlinJoshua Kelley99990  6000067.51543.593.52.762261.56631.56%1.135.330985798
55Jelani Woods72300.2Keenan AllenJustin HerbertNick FolesChase McLaughlinJoshua Kelley67230  6000067.5844.5932.758961.83631.56%1.135.352850877
56Los Angeles Chargers264300.2Mike WilliamsJustin HerbertNick FolesChase McLaughlinJoshua Kelley133380  5900067.0436.5972.741561.17731.40%1.135.425384211
57Indianapolis Colts691300.2Nick FolesJustin HerbertMike WilliamsChase McLaughlinJoshua Kelley100620  5900067.15538.5942.750661.12731.40%1.135.379341353
58Ashton Dulin63300.2Nick FolesJustin HerbertKeenan AllenCameron DickerJoshua Kelley100005  5950066.71546.591.52.768263.61631.35%1.375.29952381
Worksheet
Cell Formulas
RangeFormula
M2:M58M2=IF(Y2<=AGGREGATE(15,6,$Y$2:$Y$1263/($G$2:$G$1263=G2),VLOOKUP(G2,$A$29:$C$35,3,0)),"x","")
N2N2=IF(Y2<=AGGREGATE(15,6,$Y$2:$Y$1500/($H$2:$K$1500=H2),VLOOKUP(H2,$A$38:$C$58,3,0)),"x","")
N3:N58N3=IF(Y3<=AGGREGATE(15,6,$Y$2:$Y$1500/($H$2:$K$1500=H3),VLOOKUP($H$2,$A$38:$C$58,3,0)),"x","")
B29B29=COUNTIF(G2:G$1263,A29)
B30B30=COUNTIF(G2:G$1263,A30)
B31B31=COUNTIF(G2:G$1263,A31)
B32B32=COUNTIF(G2:G$1263,A32)
B33B33=COUNTIF(G2:G$1263,A33)
B34B34=COUNTIF(G2:G$1263,A34)
B35B35=COUNTIF(G2:G$1263,A35)
D29D29=IFERROR(C29/B26,0)
D30D30=IFERROR(C30/B26,0)
D31D31=IFERROR(C31/B26,0)
D32D32=IFERROR(C32/B26,0)
D33D33=IFERROR(C33/B26,0)
D34D34=IFERROR(C34/B26,0)
D35D35=IFERROR(C35/B26,0)
B38B38=COUNTIF(H2:$K$1263,A38)
B39B39=COUNTIF(H2:$K$1263,A39)
B40B40=COUNTIF(H2:$K$1263,A40)
B41B41=COUNTIF(H2:$K$1263,A41)
B42B42=COUNTIF(H2:$K$1263,A42)
B43B43=COUNTIF(H2:$K$1263,A43)
B44B44=COUNTIF(H2:$K$1263,A44)
B45B45=COUNTIF(H2:$K$1263,A45)
B46B46=COUNTIF(H2:$K$1263,A46)
B47B47=COUNTIF(H2:$K$1263,A47)
B48B48=COUNTIF(H2:$K$1263,A48)
B49B49=COUNTIF(H2:$K$1263,A49)
B50B50=COUNTIF(H2:$K$1263,A50)
B51B51=COUNTIF(H2:$K$1263,A51)
B52B52=COUNTIF(H2:$K$1263,A52)
B53B53=COUNTIF(H2:$K$1263,A53)
B54B54=COUNTIF(H2:$K$1263,A54)
B55B55=COUNTIF(H2:$K$1263,A55)
D38D38=IFERROR(C38/B26,0)
D39D39=IFERROR(C39/B26,0)
D40D40=IFERROR(C40/B26,0)
D41D41=IFERROR(C41/B26,0)
D42D42=IFERROR(C42/B26,0)
D43D43=IFERROR(C43/B26,0)
D44D44=IFERROR(C44/B26,0)
D45D45=IFERROR(C45/B26,0)
D46D46=IFERROR(C46/B26,0)
D47D47=IFERROR(C47/B26,0)
D48D48=IFERROR(C48/B26,0)
D49D49=IFERROR(C49/B26,0)
D50D50=IFERROR(C50/B26,0)
D51D51=IFERROR(C51/B26,0)
D52D52=IFERROR(C52/B26,0)
D53D53=IFERROR(C53/B26,0)
D54D54=IFERROR(C54/B26,0)
D55D55=IFERROR(C55/B26,0)
B56B56=COUNTIF(H2:$K$1263,A56)
C56:C58C56=IF(A56="","",30)
D56D56=IFERROR(C56/B26,0)
B57B57=COUNTIF(H2:$K$1263,A57)
D57D57=IFERROR(C57/B26,0)
B58B58=IF(COUNTIF(H2:$K$1263,A58)=0,"",COUNTIF(H2:$K$1263,A58))
D58D58=IFERROR(C58/B26,0)
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
So adding COUNTIF seems to do what I want for 1 player.

VBA Code:
=IF(COUNTIF(H2:K2,$A$42)=1,IF(Y2<=AGGREGATE(15,6,$Y$2:$Y$1500/($H$2:$K$1500=$A$42),VLOOKUP($A$42,$A$38:$C$58,3,0)),"x",""),"")

How can I add onto this formula to go through each player in the list? I tried using + at the end then doing formula again, but that does not seem to be the proper method. Thanks!
 
Upvote 0
This is the formula I ended up with.

VBA Code:
=IFERROR(IF(COUNTIF(H2:K2,$A$38)=1,IF(X2<=AGGREGATE(15,6,$X$2:$X$6206/($H$2:$K$6206=$A$38),VLOOKUP($A$38,$A$38:$C$58,3,0)),"x","1"),""),"LINES SET TO 0")

I was wondering if it's possible to also hide hidden rows for the AGGREGATE function? I have it set for 6 which is to ignore error values, which is neccessary. I tried using number 7 aswell, but then it isn't updating to put an x in the visible rows.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

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