The purpose of this excel is to display a specific number of values in columns H or I based on a cell value and a name column based on a random number ranking.
The problem with the formula below is the lack of specification on the Index and/or Rank function that is not taking account the change of name. While it displays the correct number of values it's pulling values from the whole column as opposed to just from those belonging to the specified person.
The data below should populate a spreadsheet and the formulas will replace the values in columns H and I.
Formula in H2 =IF(AND(C2="person 1",A2<=7),(INDEX(D:D,RANK(G2,G:G))),"")
Formula in I2 =IF(AND(D2="Person 1",B2<=7),(INDEX(E:E,RANK(H2,H:H))),"")
Formula in H3:H236 =IF(AND(C3=C2,A3<=VLOOKUP(C2,$K$2:$M$21,2,FALSE)),(INDEX(D:D,RANK(G3,G:G))),IF(AND(C3=C4,A3<=VLOOKUP(C2,$K$2:$M$21,2,FALSE)),(INDEX(D:D,RANK(G3,G:G))),""))
Formula in I3:I236 =IF(AND(C3=C2,B3<=VLOOKUP(C2,$K$2:$M$21,3,FALSE)),(INDEX(D:D,RANK(G3,G:G))),IF(AND(C3=C4,B3<=VLOOKUP(C2,$K$2:$M$21,3,FALSE)),(INDEX(D:D,RANK(G3,G:G))),""))
The problem with the formula below is the lack of specification on the Index and/or Rank function that is not taking account the change of name. While it displays the correct number of values it's pulling values from the whole column as opposed to just from those belonging to the specified person.
The data below should populate a spreadsheet and the formulas will replace the values in columns H and I.
Formula in H2 =IF(AND(C2="person 1",A2<=7),(INDEX(D:D,RANK(G2,G:G))),"")
Formula in I2 =IF(AND(D2="Person 1",B2<=7),(INDEX(E:E,RANK(H2,H:H))),"")
Formula in H3:H236 =IF(AND(C3=C2,A3<=VLOOKUP(C2,$K$2:$M$21,2,FALSE)),(INDEX(D:D,RANK(G3,G:G))),IF(AND(C3=C4,A3<=VLOOKUP(C2,$K$2:$M$21,2,FALSE)),(INDEX(D:D,RANK(G3,G:G))),""))
Formula in I3:I236 =IF(AND(C3=C2,B3<=VLOOKUP(C2,$K$2:$M$21,3,FALSE)),(INDEX(D:D,RANK(G3,G:G))),IF(AND(C3=C4,B3<=VLOOKUP(C2,$K$2:$M$21,3,FALSE)),(INDEX(D:D,RANK(G3,G:G))),""))
Excel 2010 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | Criteria1 | Criteria2 | Person Name | File # | Value Field1 | Value Field2 | Random # | File# for Critiera1 | File# for Critiera2 | Person Name | Criteria1 | Criteria2 | |||
2 | 0 | 0 | Person 1 | 5523466 | $ 541.88 | 0.353266 | 5505944 | Person 1 | 7 | 3 | |||||
3 | 1 | Person 1 | 5522183 | $ 768.55 | 0.819974 | 5505957 | Person 2 | 4 | 2 | ||||||
4 | 2 | Person 1 | 5524778 | $ 773.83 | 0.85496 | 5519024 | Person 3 | 4 | 2 | ||||||
5 | 3 | Person 1 | 5502127 | $ 1,200.30 | 0.985508 | 5523466 | Person 4 | 10 | 3 | ||||||
6 | 4 | Person 1 | 5517652 | $ 1,428.84 | 0.421394 | 5519711 | Person 5 | 12 | 3 | ||||||
7 | 5 | Person 1 | 5504259 | $ 1,510.19 | 0.787703 | 5526331 | Person 6 | 13 | 3 | ||||||
8 | 6 | Person 1 | 5522407 | $ 1,726.05 | 0.379574 | 5514049 | |||||||||
9 | 7 | Person 1 | 5521914 | $ 2,066.02 | 0.296211 | 5511927 | |||||||||
10 | 8 | Person 1 | 5517601 | $ 2,106.75 | 0.796037 | ||||||||||
11 | 9 | Person 1 | 5523432 | $ 2,637.92 | 0.951678 | ||||||||||
12 | 10 | Person 1 | 5525693 | $ 2,708.06 | 0.501158 | ||||||||||
13 | 11 | Person 1 | 5516669 | $ 2,717.19 | 0.512559 | ||||||||||
14 | 12 | Person 1 | 5505035 | $ 2,972.46 | 0.749989 | ||||||||||
15 | 13 | Person 1 | 5519024 | $ 3,418.47 | 0.259492 | ||||||||||
16 | 14 | Person 1 | 5506951 | $ 3,558.31 | 0.529597 | ||||||||||
17 | 15 | Person 1 | 5505957 | $ 4,156.14 | 0.861768 | ||||||||||
18 | 16 | Person 1 | 5503813 | $ 5,036.29 | 0.475368 | ||||||||||
19 | 17 | Person 1 | 5519909 | $ 5,052.16 | 0.260247 | ||||||||||
20 | 18 | Person 1 | 5507720 | $ 5,458.28 | 0.423069 | ||||||||||
21 | 19 | Person 1 | 5523398 | $ 5,846.33 | 0.211517 | ||||||||||
22 | 20 | Person 1 | 5526331 | $ 5,981.93 | 0.272262 | ||||||||||
23 | 21 | Person 1 | 5512391 | $ 8,062.63 | 0.575073 | ||||||||||
24 | 1 | Person 1 | 5500711 | $ 2,308.48 | 0.350592 | 5510038 | |||||||||
25 | 2 | Person 1 | 5507074 | $ 16,135.88 | 0.947065 | 5502127 | |||||||||
26 | 3 | Person 1 | 5509100 | $ 16,430.72 | 0.465896 | 5510867 | |||||||||
27 | 4 | Person 1 | 5509448 | $ 8,252.10 | 0.898739 | ||||||||||
28 | 5 | Person 1 | 5510596 | $ 8,565.58 | 0.474861 | ||||||||||
29 | 6 | Person 1 | 5510678 | $ 3,260.37 | 0.202444 | ||||||||||
30 | 7 | Person 1 | 5518219 | $ 5,065.45 | 0.363097 | ||||||||||
31 | 8 | Person 1 | 5519785 | $ - | 0.343625 | ||||||||||
32 | 9 | Person 1 | 5519978 | $ 17,034.34 | 0.633883 | ||||||||||
33 | 10 | Person 1 | 5522760 | $ 6,259.39 | 0.097369 | ||||||||||
34 | 1 | Person 2 | 5508553 | $ 877.09 | 0.593764 | 5511807 | |||||||||
35 | 2 | Person 2 | 5526170 | $ 1,135.63 | 0.317744 | 5506432 | |||||||||
36 | 3 | Person 2 | 5518889 | $ 1,287.86 | 0.102342 | 5509736 | |||||||||
37 | 4 | Person 2 | 5523012 | $ 1,287.86 | 0.547971 | 5528659 | |||||||||
38 | 5 | Person 2 | 5527822 | $ 1,675.19 | 0.219639 | ||||||||||
39 | 6 | Person 2 | 5511807 | $ 1,806.63 | 0.112683 | ||||||||||
40 | 7 | Person 2 | 5505485 | $ 1,922.27 | 0.598361 | ||||||||||
41 | 8 | Person 2 | 5505572 | $ 2,296.45 | 0.290566 | ||||||||||
42 | 9 | Person 2 | 5528659 | $ 3,277.41 | 0.6787 | ||||||||||
43 | 10 | Person 2 | 5517481 | $ 3,322.25 | 0.49769 | ||||||||||
44 | 11 | Person 2 | 5528908 | $ 3,375.87 | 0.805792 | ||||||||||
45 | 12 | Person 2 | 5504629 | $ 3,479.52 | 0.523029 | ||||||||||
46 | 13 | Person 2 | 5510840 | $ 5,457.51 | 0.05475 | ||||||||||
47 | 1 | Person 2 | 5504481 | $ 3,627.06 | 0.670454 | 5508553 | |||||||||
48 | 2 | Person 2 | 5512174 | $ 5,777.10 | 0.678337 | 5522760 | |||||||||
49 | 3 | Person 2 | 5518369 | $ 3,683.58 | 0.406746 | ||||||||||
50 | 4 | Person 2 | 5518510 | $ 15,416.26 | 0.457473 | ||||||||||
51 | 1 | person 3 | 5519991 | $ 1,308.19 | 0.667639 | 5526170 | |||||||||
52 | 2 | person 3 | 5530146 | $ 1,619.80 | 0.433232 | 5528172 | |||||||||
53 | 3 | person 3 | 5506000 | $ 2,485.44 | 0.904492 | 5521914 | |||||||||
54 | 4 | person 3 | 5510867 | $ 2,896.26 | 0.118109 | 5494326 | |||||||||
55 | 5 | person 3 | 5517372 | $ 3,402.16 | 0.094509 | ||||||||||
56 | 6 | person 3 | 5519116 | $ 4,024.55 | 0.753897 | ||||||||||
57 | 7 | person 3 | 5528172 | $ 4,116.11 | 0.482778 | ||||||||||
58 | 8 | person 3 | 5505755 | $ 4,285.16 | 0.303059 | ||||||||||
59 | 9 | person 3 | 5523026 | $ 6,942.66 | 0.934322 | ||||||||||
60 | 10 | person 3 | 5519711 | $ 8,779.01 | 0.214863 | ||||||||||
61 | 11 | person 3 | 5516974 | $ 10,236.46 | 0.766763 | ||||||||||
62 | 12 | person 3 | 5519010 | $ 18,789.43 | 0.832706 | ||||||||||
63 | 1 | person 3 | 5504732 | $ 8,625.59 | 0.041118 | 5515912 | |||||||||
64 | 2 | person 3 | 5514049 | $ 5,046.08 | 0.089569 | 5502333 | |||||||||
65 | 3 | person 3 | 5514897 | $ 5,866.53 | 0.980576 | ||||||||||
66 | 4 | person 3 | 5527626 | $ 5,825.82 | 0.932558 | ||||||||||
67 | 1 | person 4 | 5505944 | $ 91.21 | 0.944739 | 5517652 | |||||||||
68 | 2 | person 4 | 5510038 | $ 94.16 | 0.060734 | 5503859 | |||||||||
69 | 3 | person 4 | 5520734 | $ 183.38 | 0.382041 | 5504732 | |||||||||
70 | 4 | person 4 | 5519195 | $ 309.68 | 0.881107 | 5525693 | |||||||||
71 | 5 | person 4 | 5519271 | $ 405.34 | 0.359764 | 5527626 | |||||||||
72 | 6 | person 4 | 5506432 | $ 430.78 | 0.209652 | 5501673 | |||||||||
73 | 7 | person 4 | 5516875 | $ 447.96 | 0.526974 | 5528908 | |||||||||
74 | 8 | person 4 | 5511927 | $ 660.33 | 0.144478 | 5506185 | |||||||||
75 | 9 | person 4 | 5502475 | $ 673.70 | 0.769267 | 5507074 | |||||||||
76 | 10 | person 4 | 5511880 | $ 701.28 | 0.331057 | 5519271 | |||||||||
77 | 11 | person 4 | 5508358 | $ 722.25 | 0.662813 | ||||||||||
78 | 12 | person 4 | 5510150 | $ 780.19 | 0.819091 | ||||||||||
79 | 13 | person 4 | 5505104 | $ 812.33 | 0.694237 | ||||||||||
80 | 14 | person 4 | 5514961 | $ 869.94 | 0.869905 | ||||||||||
81 | 15 | person 4 | 5505186 | $ 1,011.75 | 0.191852 | ||||||||||
82 | 16 | person 4 | 5501673 | $ 1,029.74 | 0.78734 | ||||||||||
83 | 17 | person 4 | 5518379 | $ 1,112.65 | 0.996997 | ||||||||||
84 | 18 | person 4 | 5512711 | $ 1,120.74 | 0.42425 | ||||||||||
85 | 19 | person 4 | 5506185 | $ 1,240.52 | 0.058602 | ||||||||||
86 | 20 | person 4 | 5511660 | $ 1,335.23 | 0.883844 | ||||||||||
87 | 21 | person 4 | 5494326 | $ 1,397.90 | 0.795586 | ||||||||||
88 | 22 | person 4 | 5510922 | $ 1,401.97 | 0.053654 | ||||||||||
89 | 23 | person 4 | 5509736 | $ 1,427.44 | 0.728766 | ||||||||||
90 | 24 | person 4 | 5510969 | $ 1,526.40 | 0.468481 | ||||||||||
91 | 25 | person 4 | 5507383 | $ 1,532.20 | 0.785363 | ||||||||||
92 | 1 | person 4 | 5498726 | $ 5,347.20 | 0.124224 | 5511660 | |||||||||
93 | 2 | person 4 | 5502333 | $ 5,210.38 | 0.336998 | 5519195 | |||||||||
94 | 3 | person 4 | 5503859 | $ 14,033.89 | 0.454906 | 5519116 | |||||||||
95 | 4 | person 4 | 5507718 | $ 3,374.77 | 0.752951 | ||||||||||
96 | 5 | person 4 | 5510907 | $ 11,495.36 | 0.394693 | ||||||||||
97 | 6 | person 4 | 5511602 | $ 1,507.94 | 0.518461 | ||||||||||
98 | 7 | person 4 | 5515912 | $ 2,823.65 | 0.092585 | ||||||||||
99 | 8 | person 4 | 5522538 | $ 3,275.90 | 0.58766 | ||||||||||
Sheet1 |
Last edited: