Rank list of value
This tutorial shows how to rank a list of values using an Excel formula or VBA
Example: Rank list of values
=RANK(C5,$C$5:$C$10)
|
This formula uses the Excel RANK function to rank values in a list. If a list contains same numbers the RANK function will give them the same rank.
|
Sub Rank_list_of_values()
'declare variables
Dim ws As Worksheet
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'rank a list of values
ws.Range("D5") = Application.WorksheetFunction.Rank(ws.Range("C5"), ws.Range("$C$5:$C$10"))
ws.Range("D5") = Application.WorksheetFunction.Rank(ws.Range("C5"), ws.Range("$C$5:$C$10"))
End Sub
EXPLANATION
This tutorial shows how to rank a list of values through the use of an Excel formula or VBA.
The Excel and VBA method both use the RANK function to rank a range of values.
FORMULA
=RANK(number,range)
=RANK(number,range)
ARGUMENTS
number: A number that you rank.
range: A range that contains the numbers to rank.
number: A number that you rank.
range: A range that contains the numbers to rank.
RELATED TOPICS
Related Topic | Description | Related Topic and Description |
---|---|---|
Return most frequently occurring text | How to return most frequently occurring text using Excel and VBA |