Rank without ties ignoring zeros
This tutorial shows how to rank a range of numbers without ties whilst ignoring zeros (0) through the use of an Excel formula, with the IF, RANK and COUNTIF functions
Hard coded formula
Cell reference formula
|
GENERIC FORMULA
=IF(number>0,(IF(number=0,"",RANK(number,range)+COUNTIF(dynamic_range,number)-1)),IF(number=0,"",(IF(number=0,"",RANK(number,range)+COUNTIF(dynamic_range,number)-1))-COUNTIF(range,0)))
ARGUMENTS GENERIC FORMULA
=IF(number>zero,(IF(number=zero,"",RANK(number,range)+COUNTIF(dynamic_range,number)-1)),IF(number=zero,"",(IF(number=zero,"",RANK(number,range)+COUNTIF(dynamic_range,number)-1))-COUNTIF(range,0)))
ARGUMENTS EXPLANATION This formula ranks a set of numbers without ties and ignoring zeros (0) with the use of the IF, RANK and COUNTIF functions. If a list has two or more of the same numbers the formula will provide them with sequential ranking numbers instead of the same rank. It also takes into consideration the impact of negative and positive numbers and ranks them appropriately. The ranking order is from highest to lowest number. If a cell is 0 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 without duplicates in range C5 to C11 (hard coded example) or C7 to C13 (cell reference example) and ignores all cells that comprise entirely of 0. |
RELATED TOPICS
Related Topic | Description | Related Topic and Description |
---|---|---|
Rank ignoring zeros | How to rank numbers ignoring zeros (0) | |
Rank list without ties | How to rank a range of numbers without ties |
RELATED FUNCTIONS
Related Functions | Description | Related Functions and Description |
---|---|---|
IF Function | 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 | |
COUNTIF Function | The Excel COUNTIF function returns the number of cells in a range that meet a specified criteria |