RANK function in Google Sheets
Returns the rank of a specified value in a dataset.
=RANK(value, data, [is_ascending])RANK syntax and parameters
Three arguments, two required.
- valueanyRequired
The value whose rank will be determined. If data does not contain value in any cell or element, RANK will return the #N/A error.
- dataarrayRequired
The array or range containing the dataset to consider.
- is_ascendingnumberOptional
[ OPTIONAL - 0 by default ] Whether to consider the values in data in descending or ascending order. If this is 0, the greatest value in data will have rank 1; if this is 1, the least value in data will have rank 1.
RANK examples
Formulas you'll actually reuse.
A rep's position on the sales leaderboard, biggest first:
=RANK(B2, B$2:B$50)Result
7Ascending rank — lap times, where smallest wins:
=RANK(B2, B$2:B$50, 1)Result
3
RANK in Excel
Same name — your formula ports as-is.
Try RANK in the playground
Edit the example — nothing to install.
Preloaded with the RANK formula from Example 1 — change anything and watch it respond.
RANK errors
What they mean — and the fixes.
#N/AThe value isn't in the reference range — RANK matches exactly; check the range covers the row you're ranking.
Related functions
More ways Google Sheets gets this done.
- AVERAGEIFReturns the average of a range depending on criteria.StatisticalExcel
- FORECAST.LINEARSeeStatisticalExcel
- CELLReturns the requested information about the specified cell.InfoExcel
- CSCReturns the cosecant of an angle provided in radians. .MathExcel
- FILTERReturns a filtered version of the source range, returning only rows or columns which meet the specified conditions.FilterExcel
- FINDReturns the position at which a string is first found within text.TextExcel