Contact

RANK.EQ in Microsoft Excel: Ranking Direction and Equal Values

Statistical Intermediate Microsoft Excel

Use RANK.EQ and legacy RANK with explicit ordering, equal-value competition ranks, tie gaps and migration checks against RANK.AVG.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Availability and version history

  • Introduced: Microsoft marks this function as introduced in Excel 2010. Version-marker reference.
  • Availability: Official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
  • Checked: October 14, 2026; official RANK.EQ reference. Documentation check, not a new native test; existing example-verification notes retain their scope.

Quick answer

Use RANK.EQ in Microsoft Excel to assign an observation its position in a numeric list, giving tied values the same best position. The working example below describes daily order totals; it returns a position, not orders. The official reference supports the function’s identity and purpose.

This guide separates documentation review from application testing. The expected numbers are independently calculated, not screenshots or results captured from Microsoft Excel.

Syntax and arguments

RANK.EQ(number, ref, [order])

Value: the measurement whose rank is required, here an observation already present in the register.

Reference range: the comparison group. Lock its row and column coordinates when copying a ranking formula.

Direction: descending for highest-first ranking, ascending for lowest-first ranking. The examples state the direction explicitly and use the parameter form documented for this program.

When this calculation is useful

Use RANK.EQ when every row needs a position against the same comparison group. Unlike LARGE or SMALL, which return a value when given a position, ranking starts with a value and returns its position. Keep an ordinary record identifier as well; a rank is not a stable ID.

The EQ tie rule is competition ranking: if two records share second place, both receive 2 and the next record receives 4. It is neither average ranking nor dense ranking. A leaderboard that must award a unique position to every row needs a separate, documented tie-break rule rather than an assumption that this function resolves ties.

Set up the practice data

An operations workbook with one row per trading day provides the scenario. Enter the following numeric observations into A2:A9, one per row, with a header in A1. Use a spare result cell outside the input range.

Cell Orders
A2 240
A3 180
A4 420
A5 240
A6 300
A7 540
A8 120
A9 360

Download the Microsoft Excel RANK.EQ practice data (CSV). Import it into a new, blank sheet starting at A1, with a comma as the file delimiter and the header row retained. The CSV contains input values only, not formulas or native test results. Blank spacer columns place the requested position in D2 and any additional test data in column F. Keep observations numeric rather than importing them as text.

Three worked examples

Example 1: Rank a row with the highest value first

=RANK.EQ(A2,$A$2:$A$9,0)

Expected result: 5.

A2 contains 240. There are 4 observations greater than 240, so its descending position is one plus that count. The reference range stays fixed when this formula is copied down.

Example 2: Make the equal-value rule explicit

=RANK.EQ(240,A2:A9,0)

Expected result: 5.

The value 240 occurs 2 times. Each occurrence receives rank 5; a lower distinct value follows those tied positions rather than receiving the next dense rank. Duplicate measurements remain separate observations.

Example 3: Switch to lowest-value-first ranking

=RANK.EQ(A2,$A$2:$A$9,1)

Expected result: 3.

The nonzero/true direction switches to ascending order. There are 2 observations below 240, so its ascending rank is one plus that count. Choose this direction when a lower measurement should receive rank 1.

Excel default direction and a complete rank column

Microsoft specifies descending order for zero or an omitted order argument, and ascending order for any nonzero numeric order. Thus an explicit 2 or -1 still requests ascending ranks; those values do not select a second tie-breaking algorithm.

Fill the original descending formula down B2:B9. Expected ranks for the eight observations in their original order are:

5, 7, 2, 5, 4, 1, 8 and 3.

With ascending order, the expected ranks are 3, 2, 7, 3, 5, 8, 1 and 6. The two 240 observations remain tied, while the values 180 and 300 receive their appropriate positions on either side.

Advanced example: a top-rank cutoff can select extra rows

For the original numeric table:

=RANK.EQ(A2,$A$2:$A$9,0)<=5

Filled down, expected flags are TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE and TRUE. That selects six records, because both 240 observations share fifth place.

If a process must choose exactly five records, it needs a separately stated tie-break policy. RANK.EQ does not choose which fifth-place record to discard, and a changing worksheet row order is not a stable identifier.

Advanced example: calculate the documented average-rank correction

Microsoft supplies a correction based on the numeric count and both directional ranks. For A2:

=RANK.EQ(A2,$A$2:$A$9,0)+(COUNT($A$2:$A$9)+1-RANK.EQ(A2,$A$2:$A$9,0)-RANK.EQ(A2,$A$2:$A$9,1))/2

For the value 240, the correction is (8+1−5−3)/2 = 0.5, so the revised descending rank is 5.5. The analogous ascending revision is 3.5. The unique value 540 has a correction of zero.

Across all eight rows, the revised descending ranks are 5.5, 7, 2, 5.5, 4, 1, 8 and 3, totaling 36. The raw competition ranks total 35 because the tied group uses the best position twice rather than the average occupied position.

This formula implements a different ranking convention deliberately. It does not change the raw RANK.EQ tie rule.

Advanced check: displayed precision versus the ranking input

In a separate three-row range, enter 10.01, 10.04 and 11. Their descending ranks are 3, 2 and 1, even if a one-decimal display makes the first two both look like 10.0.

If a stated policy instead ranks measurements rounded to one decimal, create a helper column with =ROUND(J2,1) and rank that helper range. The stored helper values are 10, 10 and 11, with descending ranks 2, 2 and 1.

Formatting changes appearance; the ROUND helper changes the values being ranked. Preserve the originals so the policy remains inspectable.

Mixed reference values and unresolved errors

Microsoft states that nonnumeric values in the comparison reference are ignored. For a controlled range containing 10, 20, =“30”, =TRUE() and a genuinely empty cell, the numeric comparison group is 10 and 20. A descending rank for 10 is therefore expected to be 2.

These controls do not establish a complete error-value, absent-number, text-number lookup or fractional-order conversion matrix. Do not assume a native error code merely from the numeric ranking model.

Check the mathematics and interpretation

For a value present in the list, descending rank equals one plus the count of observations strictly greater than it. Ascending rank uses the count strictly below it. This explains equal ranks without choosing a particular tied row or sorting only part of a record. Keep stored results at full available precision and round only the final presentation when a report requires it. The displayed expectations above are rounded where necessary; a different number of displayed decimal places is not by itself a calculation error.

Common mistakes and troubleshooting

There are gaps after a tie. That is the intended best-position rule, not a missing result. Do not renumber the remaining rows unless your report deliberately uses a different ranking scheme.

The apparent best record ranks last. Check the direction. Descending order gives the highest number rank 1; ascending order gives the lowest number rank 1. Use an explicit direction in shared workbooks instead of leaving the interpretation implicit.

Displayed values look tied but ranks differ. Formatting can hide differences in the underlying numbers. Decide whether the ranking rule should use full precision or deliberately rounded measurements, then create the intended numeric input before ranking. Keep the comparison range fixed when copying down.

Microsoft Excel notes and compatibility

The Microsoft function reference is the source for this guide’s Excel name and purpose. The Excel reference uses an array or reference as the comparison data. The small, ordinary cell ranges here avoid depending on dynamic-array functions or workbook-specific named ranges.

For the daily order workbook, keep one comparable trading day per row. Exclude a grand-total row from the statistical input; it is not another trading day. When combining weeks, check that repeated dates are legitimate records rather than duplicated imports. The formula cannot make that distinction for you.

These examples use English function names and comma-separated arguments. A workbook configured for another regional separator may require semicolons. The data addresses stay the same. Test a copied formula on a small known input after an import or file conversion; this guide is not a certification of every Excel edition or exchange format.

For the same statistical question in other programs, see RANK.EQ in Google Sheets, RANK.EQ in ONLYOFFICE, RANK.EQ in SoftMaker PlanMaker. These links identify corresponding measures, not a guarantee that names, mixed-data rules, error codes or file conversions are identical.

MEDIAN, LARGE, SMALL, STDEV.S, STDEV.P, VAR.S, VAR.P. Browse the Microsoft Excel function library for the other published guides.

Editorial verification: Complete article and direct Microsoft reference reviewed on October 14, 2026. All three original numeric examples, added arithmetic models, original CSV inputs and related links were checked independently. Exact approved availability/history text is retained. No native Excel execution, maximum-size benchmark or round-trip workbook certification was performed. Mixed-error coercion, unsupported input types and unassigned edge-case error codes remain explicitly unverified.

Legacy RANK compatibility contract

=RANK(number,ref,[order]) requires the target and reference list. Order omitted or zero means descending; any nonzero order means ascending. Microsoft says nonnumeric members of ref are ignored. Equal values receive the same competition rank and consume positions, leaving gaps. RANK.EQ preserves this choice of rank definition; RANK.AVG deliberately averages occupied positions. The legacy help does not provide a complete error-code matrix, so missing targets, invalid scalar arguments and referenced errors remain target-version checks rather than inferred guarantees here.

Original legacy example and independent check

Enter 90, 70, 70, 40 in A2:A5 on a fresh sheet. =RANK(A3,$A$2:$A$5) independently targets 2: one number exceeds 70, and rank is one plus that count. The ascending formula =RANK(A3,$A$2:$A$5,1) also targets 2, since only 40 is lower. Descending ranks for all four rows are 1, 2, 2, 4; ascending ranks are 4, 2, 2, 1. No row receives rank 3 in either ordering.

Migration traps

Changing the name to RANK.AVG would make the two 70s rank 2.5, the mean of occupied positions 2 and 3. That is a reporting-policy change, not just a spelling update. RANK.EQ is the documented counterpart for keeping competition ranks. Preserve an omitted order as descending and lock the reference range when copying. A ranking formula does not reorder the input rows or choose a unique winner among ties. These count-based controls are independent calculations, not native execution or a full mixed-type error audit.

Compatibility and verification scope

Checked October 19, 2026 against the Microsoft legacy RANK reference. Its current Applies To list includes Microsoft 365 (Windows/Mac), Excel 2024 and 2021 (Windows/Mac), 2019 and 2016. The Excel 2010 function-change reference places the renamed counterpart in that transition and retains old names for backward compatibility. This does not date the original legacy function’s introduction. Compatibility status is not retirement: no removal release or last-working build is established here. Keep old-workbook compatibility needs in view, test before migration, and do not assume identical numerical behavior across versions. This addition is a documentation review with independent calculations; it supplies no native Excel evidence.