JARichard74
Board Regular
- Joined
- Dec 16, 2019
- Messages
- 114
- Office Version
- 365
- Platform
- Windows
In this case, y=3 and z-1 = 4. What I am trying to do is RANK the numbers in E4:E7 based on the values in E4:E7, then RANK the numbers in E9:E12 based on the values in E9:E12 and then RANK the numbers in E14:E17 based on the values in E14:E17. The code below only puts the formula in F4:F7 and the formula it puts is RANK.EQ($E4,E14:E17,0), RANK.EQ($E5,E14:E17,0), RANK.EQ($E6,E14:E17,0), RANK.EQ($E7,E14:E17,0). Thanks for your help
VBA Code:
For k = 1 To y
For j = 1 To z - 1
ThisWorkbook.Worksheets("Rated").Range("F" & j + 3).Formula = "=RANK.EQ($E" & j + 3 & ",E" & k * 5 - 1 & ":E" & k * 5 + 2 & ",0)"
Next j
Next k