Rank if greater than or equal to zero

This tutorial shows how to rank a number if it is greater than or equal to zero (0) through the use of an Excel formula, with the IF and RANK functions

EXCEL FORMULA 1. Rank if greater than or equal to zero

EXCEL

Hard coded formula
Rank if greater than or equal to zero
Cell reference formula
Rank if greater than or equal to zero
=IF(C5>=0,RANK(C5,$C$5:$C$11),"")
=IF(C7>=$C$4,RANK(C7,$C$7:$C$13),"")
GENERIC FORMULA

=IF(number>=0,RANK(number,range),"")

ARGUMENTS
number: The number to test and rank if greater than or equal to zero.
range: A range that contains the numbers to test and rank.

GENERIC FORMULA

=IF(number>=zero,RANK(number,range),"")

ARGUMENTS
number: The number to test and rank if greater than or equal to zero.
range: A range that contains the numbers to test and rank.
zero: Value of zero (0).

EXPLANATION

This formula uses the IF and RANK functions to rank numbers from a selected range that are greater than or equal to 0, alternatively, the formula will return a blank cell.
Click on either the Hard Coded or Cell Reference button to view the formula that has the value of zero (0) directly entered into the formula or referenced to a specific cell.

In this example the formula ranks the values in range C5 to C11 (hard coded example) or C7 to C13 (cell reference example) to assess which of these numbers is larger than or equal to 0 and rank this number against other numbers in the range that are greater than or equal to 0. For all the other numbers the formula will return a blank cell through the use of double quotation marks ("").

RELATED TOPICS

Related Topic Description Related Topic and Description
How to rank a number if it is greater than zero (0)
How to find largest n numbers
How to test if a value in a cell is ranked first and return a value if the test is True or False

RELATED FUNCTIONS

Related Functions Description Related Functions and Description
The Excel IF function performs a test on specified conditions entered into the formula and returns a specified value if the result is TRUE or another specified value if the result is FALSE