Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Google Sheets RANK.EQ Function: A Complete Guide

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The Google Sheets RANK.EQ function calculates the rank of a specific number within a list of numbers, assigning the same rank to duplicate values. It is essential for creating leaderboards, grading systems, or sorting data where ties must be handled consistently without skipping subsequent ranks.

What You'll Need

  • A Google Sheets spreadsheet with numerical data.
  • An empty cell where you want the result to appear.
  • Basic knowledge of how to select ranges in Sheets (e.g., A1:A10).

Step-by-Step

  1. Prepare your data: Ensure your list of numbers is organized in a single column or row. For this example, assume your data is in cells A2 through A10. Note that text values are ignored by the function, so only numeric entries will be ranked.
  2. Select the output cell: Click on the cell where you want the rank of a specific value to appear. This could be next to the data set or in a separate summary area.
  3. Enter the formula start: Type =RANK.EQ( into the selected cell. The opening parenthesis signals the start of the arguments.
  4. Define the value to rank: Select the specific cell containing the number you want to rank. For instance, if you are ranking the value in cell B2, click on B2 or type B2. Add a comma after this argument.
  5. Define the reference range: Select the entire range of numbers against which the value will be compared. Using our previous example, drag to select A2:A10 or type A2:A10. If you plan to copy this formula down for multiple rows, consider using absolute references (e.g., $A$2:$A$10) to lock the range.
  6. Set the order (optional): By default, RANK.EQ assumes descending order (largest number gets rank 1). To rank in ascending order (smallest number gets rank 1), add a comma followed by 1. To explicitly state descending order, use 0 or omit this argument entirely.
  7. Close and execute: Type the closing parenthesis ) and press Enter. The cell will now display the integer rank of the specified value within the defined range.

Common Mistakes

One frequent error is failing to lock the reference range when copying formulas. If you create a column of ranks next to your data and copy the formula down, relative references like A2:A10 will shift to A3:A11, A4:A12, etc. This results in each row being ranked against a different subset of data, producing incorrect rankings. Always use dollar signs (e.g., $A$2:$A$10) to fix the range.

Another common issue involves mixing data types. If your range contains text strings alongside numbers, RANK.EQ ignores the text. However, if the value you are trying to rank is stored as text (even if it looks like a number), the function may return an error or unexpected results. Ensure all relevant cells are formatted as numbers.

Tips

Use RANK.EQ in conjunction with conditional formatting to visually highlight top performers. For example, you can apply a green background to cells where the rank is less than or equal to 3. This makes high-level analysis faster and more intuitive for users viewing the sheet.

If you need to handle ties differently—specifically, if you want duplicate values to take up distinct rank positions rather than sharing one—you should use the RANK function instead. However, note that RANK is deprecated in favor of RANK.EQ and RANK.AVG. For most modern applications, RANK.EQ is the standard choice because it aligns with Excel's behavior, ensuring compatibility when exporting files.

Combine RANK.EQ with the QUERY function for dynamic reporting. You can query a dataset, filter out null values, and then apply ranking logic to the resulting subset, allowing for real-time updates without manual range adjustments.

Troubleshooting

If you encounter a #N/A error, verify that the value you are trying to rank actually exists within the reference range. RANK.EQ cannot assign a rank to a number that is not present in the comparison set. Check for typos in cell references or ensure that the value hasn't been accidentally deleted from the source list.

A #VALUE! error typically indicates that the arguments provided are not numeric. Inspect both the target value and the reference range for any non-numeric characters, such as spaces, currency symbols, or text labels. Use the ISNUMBER() function to test individual cells if you are unsure about their data type.

If the results seem reversed (e.g., the smallest number has rank 1 when you expected the largest), check the third argument in your formula. Ensure you have not inadvertently set the order to ascending (1) when you intended descending (0). Removing the third argument defaults to descending order.

Frequently Asked Questions

What is the difference between RANK.EQ and RANK.AVG?

RANK.EQ assigns the same rank to tied values, and the next rank skips accordingly (e.g., two items tie for 1st place, the next item is 3rd). RANK.AVG also assigns the same rank to tied values but calculates the average of the ranks they would have occupied (e.g., two items tie for 1st and 2nd, so both get rank 1.5).

Does RANK.EQ work with text values?

No, RANK.EQ strictly operates on numeric values. Text entries in the reference range are ignored during the calculation. If you attempt to rank a text string, the function will return an error.

Can I rank dates using this function?

Yes, because dates in Google Sheets are stored as serial numbers internally. You can rank dates just like any other number. Ascending order will rank the earliest date as 1, while descending order will rank the latest date as 1.

How do I break ties in ranking?

RANK.EQ does not break ties; it treats identical values equally. To break ties, you must modify your data source to include a unique secondary identifier (like a timestamp or ID) that ensures no two values are exactly the same, or use a more complex array formula involving COUNTIF.

Is RANK.EQ compatible with Microsoft Excel?

Yes, the syntax and functionality of RANK.EQ in Google Sheets are identical to those in Microsoft Excel. This makes it easy to export spreadsheets between platforms without losing ranking accuracy.