I have a rank formula that counts a variable range for evaluation. However the starting point is a fixed cell reference which is fixed to specific column. I want it to be variable based on find & offset functions as the excel sheet changes & therefore the range in the formula needs to move.
In below how do I change that code so that the starting cell & columns are complete variables?
Sub dural()
Dim N As Long
N = Cells(Rows.Count, "B").End(xlUp).Row
Range("A2:A" & N).Formula = "=rank(B2,B$2:B" & N & ")"
End Sub
In below how do I change that code so that the starting cell & columns are complete variables?
Sub dural()
Dim N As Long
N = Cells(Rows.Count, "B").End(xlUp).Row
Range("A2:A" & N).Formula = "=rank(B2,B$2:B" & N & ")"
End Sub