Can you define FirstRow and LastRow functions define a set or group of number? The start and end of a set so in sampledata sheet for column A for numbers = 1 FirstRow would equal A2 and lastRow equal to A8. That would allow me to then know the range of numbers for my PercentRank function.
I have been trying without success. My code represents where I am going but if you have other code please let me know.
This code is attemping to define a values of a group which all have a number 1 as its value and work out the percent rank of values in Column C and return it to column D.
What I am trying to acheive is column D in the Sampledata workbook.![]()
LastRow = Cells(Rows.Count, 1).End(xlUp).Row FirstRow = Cells(Rows.Count, 1).Start(xlUp).Row Cellref = ? Dim myArray (1 to 9) Dim X as int X = 1 For Each group In Range("A", Range("A" & Rows.Count).End(xlUp) If group.value = "X" Then PERCENTRANK(Cells("FirstRow, C": "LastRow, C", "Cellref needing loop")) next X next group End Sub
So that PERCENTRANK(Cells("FirstRow, C": "LastRow, C", "Cellref needing loop")) when column A equals 1 would translate toAnd then repeat for each number in column A.![]()
PERCENTRANK($C$2:$C$8,C2) PERCENTRANK($C$2:$C$8,C3) PERCENTRANK($C$2:$C$8,C3) PERCENTRANK($C$2:$C$8,C5) PERCENTRANK($C$2:$C$8,C6) PERCENTRANK($C$2:$C$8,C7) PERCENTRANK($C$2:$C$8,C8)











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks