I tried your suggestion, however the result is the same. Here is more detailed data set that I am working with and more explanation:
[TABLE="width: 1427"]
<colgroup><col><col><col span="6"><col><col span="4"><col><col span="5"><col><col><col span="2"></colgroup><tbody>[TR]
[TD]3[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]*****[/TD]
[TD]*****[/TD]
[TD]BA[/TD]
[TD]BB[/TD]
[TD]BC[/TD]
[TD]BD[/TD]
[TD]BE[/TD]
[TD]BF[/TD]
[TD]BG[/TD]
[TD]BH[/TD]
[TD]BI[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Category[/TD]
[TD]Weight1[/TD]
[TD]Weight2[/TD]
[TD]Weight3[/TD]
[TD]Weight4[/TD]
[TD]Weight5[/TD]
[TD]Weight 6[/TD]
[TD] [/TD]
[TD]Rank1[/TD]
[TD]Rank2[/TD]
[TD]Rank3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Weight1[/TD]
[TD]Weight2[/TD]
[TD]Weight3[/TD]
[TD]Weight4[/TD]
[TD]Weight5[/TD]
[TD]Weight 6[/TD]
[TD]Combined[/TD]
[TD]Rank[/TD]
[TD]Player[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Points[/TD]
[TD]0%[/TD]
[TD]0%[/TD]
[TD]0%[/TD]
[TD]36%[/TD]
[TD]0%[/TD]
[TD]64%[/TD]
[TD] [/TD]
[TD]Player2[/TD]
[TD]Player4[/TD]
[TD]Player5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]9.6[/TD]
[TD]13.2[/TD]
[TD]16.7[/TD]
[TD]9.1[/TD]
[TD]16.5[/TD]
[TD]16.5[/TD]
[TD]16.5[/TD]
[TD]4[/TD]
[TD]Player1[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Rebounds[/TD]
[TD]10%[/TD]
[TD]4%[/TD]
[TD]1%[/TD]
[TD]35%[/TD]
[TD]4%[/TD]
[TD]47%[/TD]
[TD] [/TD]
[TD]Player2[/TD]
[TD]Player4[/TD]
[TD]Player5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]5.8[/TD]
[TD]8.3[/TD]
[TD]8.3[/TD]
[TD]8.3[/TD]
[TD]8.4[/TD]
[TD]8.3[/TD]
[TD]8.3[/TD]
[TD]1[/TD]
[TD]Player2[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]Blocks[/TD]
[TD]0%[/TD]
[TD]1%[/TD]
[TD]0%[/TD]
[TD]33%[/TD]
[TD]0%[/TD]
[TD]66%[/TD]
[TD] [/TD]
[TD]Player2[/TD]
[TD]Player4[/TD]
[TD]Player5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]19.9[/TD]
[TD]19.7[/TD]
[TD]19.7[/TD]
[TD]19.7[/TD]
[TD]19.7[/TD]
[TD]19.6[/TD]
[TD]19.6[/TD]
[TD]5[/TD]
[TD]Player3[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]Steals[/TD]
[TD]4%[/TD]
[TD]5%[/TD]
[TD]12%[/TD]
[TD]34%[/TD]
[TD]4%[/TD]
[TD]40%[/TD]
[TD] [/TD]
[TD]Player2[/TD]
[TD]Player4[/TD]
[TD]Player5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]19.1[/TD]
[TD]8.8[/TD]
[TD]8.9[/TD]
[TD]8.9[/TD]
[TD]8.8[/TD]
[TD]8.8[/TD]
[TD]8.8[/TD]
[TD]2[/TD]
[TD]Player4[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]FGs[/TD]
[TD]7%[/TD]
[TD]1%[/TD]
[TD]14%[/TD]
[TD]22%[/TD]
[TD]5%[/TD]
[TD]51%[/TD]
[TD] [/TD]
[TD]Player2[/TD]
[TD]Player4[/TD]
[TD]Player5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]12.9[/TD]
[TD]14.4[/TD]
[TD]14.4[/TD]
[TD]14.4[/TD]
[TD]14.4[/TD]
[TD]14.4[/TD]
[TD]14.4[/TD]
[TD]3[/TD]
[TD]Player5[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]Turnovers[/TD]
[TD]6%[/TD]
[TD]7%[/TD]
[TD]8%[/TD]
[TD]31%[/TD]
[TD]7%[/TD]
[TD]41%[/TD]
[TD] [/TD]
[TD]Player2[/TD]
[TD]Player4[/TD]
[TD]Player5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]Assists[/TD]
[TD]13%[/TD]
[TD]7%[/TD]
[TD]0%[/TD]
[TD]16%[/TD]
[TD]9%[/TD]
[TD]54%[/TD]
[TD] [/TD]
[TD]Player2[/TD]
[TD]Player4[/TD]
[TD]Player5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]
Cells K7:M13 = VLOOKUP(K$5,$BH$7:$BI$11,2) ----- looking up top 3 players ranked for each category (Points, Rebounds, etc)
Cells BG7:BG11 = SUMPRODUCT (AZ7:BG7.$D$7:$I$7) ----- calculates a combined score for each Weight
Cells BH7:BH11 =RANK.EQ(BG7,$BG$7:$BG$11,1) ----- ranks all five players based on a combined score
Steps to write a code:
1. Indicate the range of data array for given categories (Points, Rebounds, etc) ---- For i = 7 To 13
First iteration:
1. Calculate a combined score (Cell BG7) for first category (Points) using Weights in the range (
$D$7:$I$7) --- Using SUMPRODUCT formula listed above
2. Fill down formula from BG7 to BG13
3. Copy and paste values of existing VLOOKUP function in cells
K7:M7
End of first iteration
Second iteration:
1. Calculate a combined score (Cell BG7) for first category (Points) using Weights in the range (
$D$8:$I$8) --- Using SUMPRODUCT formula listed above
2. Fill down formula from BG7 to BG13
3. Copy and paste values of existing VLOOKUP function in cells
K8:M8
End of second iteration
The code would continue based on indicated data range (7 to 13)
The issue I am having is that SUMPRODUCT formula keeps the same range ($D$7:$I$7), instead of increasing by one during each iteration. Hope this helps.
Not so much.
What determines what that range should be?
Is it supposed to be incrementing by one row each time?
If so, maybe you can incorporate "i" into your equation, i.e.
Code:
[COLOR=#574123]Application.Evaluate ("=SUMPRODUCT(Range(BA" & i & ":BF" & i & "),Range(D$" & i & ":I$" & i & "))")
[/COLOR]
If it needs to be one more than i, then change all references to "i" in the formula above to "i+1"