Skip to content
Excel

RANK function in Excel

Returns the rank of a number in a list of numbers

=RANK(number, ref, [order])

RANK syntax and parameters

Three arguments, two required.

  • numbernumberRequired
  • refanyRequired
  • ordernumberOptional

RANK examples

Formulas you'll actually reuse.

  1. A rep's position on the sales leaderboard, biggest first:

    =RANK(B2, B$2:B$50)

    Result7

  2. Ascending rank — lap times, where smallest wins:

    =RANK(B2, B$2:B$50, 1)

    Result3

RANK in Google Sheets

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.

Loading the editor…

RANK errors

What they mean — and the fixes.

  • #N/A

    The value isn't in the reference range — RANK matches exactly; check the range covers the row you're ranking.