How to use the RANK.EQ function in Microsoft Excel


Manually re-sorting your Excel tables every time a score changes is a waste of time. The RANK.EQ function automates leaderboards by assigning positions instantly. Whether you’re tracking sales or race times, here’s how to keep your data dynamic and accurate.

Previously, RANK was Excel’s only ranking function. However, in 2010, Microsoft introduced RANK.EQ (identical to the old RANK) and RANK.AVG (a new option that returns the average rank for ties). In this guide, I’ll use RANK.EQ, since it’s the modern standard and works in exactly the same way as RANK.

How the RANK.EQ function works

Understanding the syntax

The RANK.EQ function identifies where a number sits relative to others in a list, providing a “live” standing that updates automatically. The function follows a straightforward syntax:

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

where:

  • number (required) is the value you want to rank.
  • ref (required) is the range or array of numbers you’re comparing the value against. Non-numeric values (like text or blanks) are ignored.
  • order (optional) determines the ranking direction. Use 0 (or leave it blank) for a descending rank, or 1 for an ascending rank.

If multiple values have the same rank, RANK.EQ assigns them the top rank of that group. For example, if two people tie for the highest score, they both receive a rank of 1, and the next highest score receives a rank of 3.

The RANK function works best with Excel tables because they handle range expansion and structured references automatically. However, if you must use a regular cell range, lock your ref using dollar signs—such as $B$2:$B$10.

To follow along as you read, download a free copy of the Excel workbook used in the examples. After you click the link, you’ll find the download button in the top-right corner of your screen, and when you open the file, you can access each use case on a separate worksheet tab.

Use case 1: Building a dynamic leaderboard

Rank entries without reordering rows

RANK.EQ identifies top performers while keeping your data in its original order.

The scenario: You have an Excel table named T_Sales. It includes an ID column representing the order in which details were signed. You want the rank in column A so the standings are visible, but you must keep the table sorted by ID to match your physical receipts.

An Excel table with IDs in column B, reps in column C, revenues in column D, with a blank Rank column in column A.

To generate these standings, type this formula into cell A2 and press Enter:

=RANK.EQ([@Revenue], [Revenue], 0)
RANK.EQ used in an Excel table to rank reps based on their revenue.

Here’s how the formula works:

  • [@Revenue] looks at the revenue for the current row. For ID 101, it sees 52000.
  • [Revenue] compares that value against every number in the entire column.
  • 0 ensures the person with the highest revenue (Elena) is assigned rank 1. You could leave this out for a cleaner formula.

Why not just use table sorting?

It’s tempting just to sort from largest to smallest using the filter arrow at the top of the Revenue column. However, as well as messing up your original ID order, it’s a static fix for a dynamic problem. As soon as you add a new sale or update a revenue figure, you would need to reapply or maintain the sort.

By using RANK.EQ, you create a “set it and forget it” system. It allows you to keep your main table in its original order, and the formula expands downward to any new rows you add, meaning the rankings update instantly.

Make the most of your data

To make the result even more meaningful, use the rank in column A as the engine for a SORTBY formula to automatically display your data from rank 1 downward.

In a blank cell, type:

=SORTBY(T_Sales, T_Sales[Rank], 1)
SORTBY in Excel using results from the RANK.EQ function to produce a league table.

This creates a dynamic copy of your table that stays ordered from 1 to 5. Even though your source table remains sorted by ID, this new list ensures that rank 1 always sits at the top. As soon as the data changes, this list updates automatically.

Use case 2: Ranking fastest times

Handle scenarios where the lowest number wins

By flipping the order argument of the RANK.EQ function, you can ensure that the smallest numbers are recognized as the “winners.”

The scenario: You’re tracking lap times in a table named T_Results. You need to keep this table in its original order of the starting grid (StartPos), but you still want to know who currently holds the fastest lap.

An Excel table with starting positions in column A, drivers in column C, lap seconds in column D, and a blank rank column in column B.

To rank these from fastest to slowest, type this formula into cell B2:

=RANK.EQ([@Seconds], [Seconds], 1)
RANK.EQ used in an Excel table to rank drivers based on their lap times.

This time, setting the order argument to 1 uses ascending ranking, ensuring the lowest time is rank 1.

Make the most of your data

By placing the rank in column B, you can extract a clean podium display using the FILTER and SORT functions together in a separate cell:

=SORT(FILTER(T_Results[[Rank]:[Seconds]], T_Results[Rank] <= 3), 1, 1)
An Excel table on the left that uses the RANK function, and a reordered version on the right that uses the SORT and FILTER functions.

This creates a secondary array that pulls only the fastest three drivers. Because it’s linked to the Rank column, the podium updates automatically even though your main table stays sorted by the StartPos column.

Use case 3: Breaking ties using a secondary metric

Use bonus points to decide the final standings

RANK.EQ assigns the same rank to tied scores. To create a unique ranking that rewards secondary performance (like bonus points), you can add COUNTIFS to your formula. This counts how many people share the same score but have a higher bonus.

The scenario: You have a table named T_League. Three players are tied at 88 points, so you want to use their bonus points to break the tie so that every rank is unique and fair.

An Excel table with players in column B, points in column C, bonus points in column D, and a blank rank column in column A.

To create a unique, merit-based ranking, type this formula into cell A2:

=RANK.EQ([@Points], [Points]) + COUNTIFS([Points], [@Points], [Bonus], ">"&[@Bonus])
RANK.EQ and COUNTIFS used in an Excel table to rank players and break ties using a Bonus column.

This formula calculates a base rank, then “pushes” tied players down based on their bonus points:

  • RANK.EQ([@Points], [Points]) identifies the standard rank. For all three players with 88 points, this returns 2 (because Dakota is #1).
  • COUNTIFS(…) is the tie-breaker. It looks only at players who have exactly the same points as the current row and counts how many of them have a bonus higher than the current row.

Let’s take Blake (88 points, 15 bonus) as an example:

  • RANK.EQ sees that Blake is tied for rank 2.
  • COUNTIFS looks at everyone with 88 points and asks, “Who has a bonus higher than Blake’s 15?” Only Emerson qualifies, so the count is 1.
  • Excel then adds that count (1) to the base rank (2). As a result, Blake is identified as rank 3.

Because this method uses standard functions, it’s incredibly fast, returns a single value per row (making it ideal for Excel tables), and is easy for others to understand.


These ranking techniques ensure every new entry finds its place on the leaderboard the second you type it in—meaning it’s a huge win for anyone tracking live competitive data. That said, if you just need a sequential list that reacts to your data entries or deletions as they happen, combine the SEQUENCE and COUNTA functions. Either way, the key is automation and time-saving—benefits both these Excel workflows offer.

OS

Windows, macOS, iPhone, iPad, Android

Free trial

1 month

Microsoft 365 includes access to Office apps like Word, Excel, and PowerPoint on up to five devices, 1 TB of OneDrive storage, and more.




Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


As someone who finds multi-leveled amusement in things that are taboo and inappropriate, I love a good dark comedy. Through sharp, cynical wit, they highlight and critique the absurdities of life while also serving as bridges between comedies and tragedies, with intentional goals of provoking thought from discomfort while simultaneously providing a cathartic release.

As we slide into this special mid-April weekend, we’re doing so with three darkly hilarious shows on Amazon Prime Video—our top pick being a newly released series inspired by true events.

3

Weeds

Illegal suburban activity with biting humor

The two-time Emmy Award-winning show Weeds is a darkly hilarious, must-see suburban satire that took a simple comedic premise to an unexpected place. Its complex narrative revolves around an upper-middle-class mother who turns to selling marijuana to support her family in the wake of her husband’s death. The Institute’s Mary-Louise Parker stars alongside Jeffrey Dean Morgan, Bob Odenkirk, Jennifer Jason Leigh, the late Kevin Nealon, and more.

When her husband dies, housewife Nancy Botwin (Parker) is buried under a mound of debt, with a family to support and an expensive lifestyle in an elite Southern California neighborhood. Needing money fast, she starts slinging weed on the DL with her brother-in-law’s friend, Conrad (The 40-Year-Old Virgin‘s Romany Malco), and his family. As the story unfolds, audiences get a fascinating look at how the maven of Mary Jane and her family engage with and push against the status quo and societal expectations of the time. It also explores immigration, privilege, body-shaming, religion, sexuality, and the war in Iraq.

Though the eight-part show is genuinely laugh-out-loud funny, contains an easy-to-root-for protagonist, and is riddled with the kinds of dramatic twists you’d see in a soap opera, we’re still unpacking all the ugly societal truths its narrative calls out, including the ways in which the suburbs push conformity on the middle class. You’ll love the biting satirical humor, dysfunctional family dynamics, and all the questionable moral decisions.

2

The Horror of Dolores Roach

A comedic descent into becoming a serial killer

A dark comedy-horror series acting as a modern-day Sweeney Todd tale, The Horror of Dolores Roach is set in gentrified Washington Heights in New York City and is an urban legend created by Aaron Mark, who also developed the story into a one-woman off-Broadway play as well as a popular Spotify podcast. Fans of shows like Dexter and Hannibal will love it.

After 16 years in prison, former marijuana dealer Dolores (Justina Machado) seeks a new life upon her release, only to find everything about the life she knew destroyed. With nowhere to go, she lives and works as an unlicensed masseuse in the basement of a friend’s empanada shop. When her stability is threatened and her desperation for revenge and survival awakens, Dolores experiences outbursts of murderous rage. To help keep her safe, her friend Luis (New Amsterdam‘s Alejandro Hernandez) chops up her victims’ bodies and uses them as a secret ingredient in his empanada fillings.

These modern Sweeney Todd-like episodes are fast-paced with a 30-minute runtime and a campy, entertaining tone, so the one-season show makes for a quick, easy binge in its satirical take on gentrification and its thematic explorations of wrongful conviction and survival.

1

Population: 11

Comedy meets thriller meets true crime

A very newly released comedy-crime series, Population: 11 is an Australian-based story about a man searching for his estranged, now-missing father in an extremely tiny Outback town with a population of 12 people. Though the premise is quirky, it is loosely inspired by true events and heavily influenced by the 2017 vanishing of a man and his dog without a trace from a small Australian Outback town with 11 residents, where local feuds made everyone a suspect.

American Andy Pruden (Superstore‘s Ben Feldman) travels to the remote, desolate Outback town to visit his estranged father. Upon his arrival, he learns his father has vanished into thin air. None of the town’s 11 residents, who all seem to harbor secrets and what Andy calls “murderer energy,” know his whereabouts. After meeting local podcaster Cassie (Gold Diggers’ Perry Mooney), the two decide, along with a “motley crew” of locals, to investigate what’s really going on.

The show does an excellent job of balancing tension with well-timed wit, and its peculiar blend of, at times, violent, dark comedy is rooted in an underlying foundation of oddball sweetness that keeps you engaged from start to finish. If you like peppy, quirky, fast-paced mysteries chock-full of cleverness and suspense, you’ll enjoy Population: 11, especially if you are a fan of shows like The Tourist. With just 12 half-hour episodes, you can binge this engaging series in one afternoon.


Though Prime Video recently increased its fees, don’t let that deter you from keeping your subscription, as there are variably priced options. Plus, with all the new content set to come our way soon, you don’t want to be left out on all the fun!

The Prime Video logo.

Subscription with ads

Yes, via Prime membership or $9/month

Simultaneous streams

3




Source link