logo
search
Formula Errors

How to Assign a Rank from 1 to 5 Based on Percentage in Excel

Maira MehtabMaira Mehtab Sep 22, 2026 871 views

Question details

The user needs to calculate a percentage by dividing an average value by a target goal, and then assign a numerical rank from 1 to 5 based on specific percentage thresholds.

Product
Excel
Device & OS
not provided
Scenario
Creating a performance ranking or rating system based on goal achievement percentages.
Observed behavior
The goal is to automatically output a rank (1 to 5) corresponding to specific percentage tiers (e.g., <80% returns 1, =100% returns 3) without manual data entry.
Before you start

Ensure your dataset has the average values and goal values in separate columns, and verify that no goal cells contain zero to prevent division errors.

Solution 1Recommended

Use the LET and Nested IF Functions to Assign Rankings

The most efficient way to assign ranks based on calculated percentages is by combining the LET function to store the calculated percentage and nested IF functions to evaluate the tiers.

The LET function allows you to define a variable (like 'perc' for the percentage) so you do not have to repeat the division calculation multiple times in your logical test. This makes your formula much shorter and easier to troubleshoot.

1
Select the destination cell

Click on the empty cell where you want the rank to appear for the first row of your data (for example, cell C2).

2
Enter the nested IF formula

Type the formula: =LET(perc,A2/B2,IF(perc<80%,1,IF(perc<100%,2,IF(perc=100%,3,IF(perc<=105%,4,5))))) assuming your average value is in cell A2 and your goal is in cell B2.

3
Apply to the remaining rows

Press Enter to apply the formula. Then, click and drag the fill handle at the bottom-right corner of the cell down the column to apply the ranking logic to the rest of your dataset.

Handling Blank or Zero Goals: To avoid #DIV/0! errors if a goal cell is empty or zero, wrap your formula with the IFERROR function: =IFERROR(LET(perc,A2/B2,IF(perc<80%,1,IF(perc<100%,2,IF(perc=100%,3,IF(perc<=105%,4,5))))), "Invalid Goal").

Easily Rank and Analyze Data with WPS Spreadsheet

WPS Spreadsheet provides robust support for advanced logical functions like LET, IF, and IFS. You can seamlessly calculate percentage-based rankings, handle large datasets, and analyze performance metrics with zero friction.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open the document containing your average and goal data.
  2. 2. Apply the ranking formula: Select the destination cell and input the nested IF or LET formula just as you would in standard spreadsheet software.
  3. 3. Drag to fill: Press Enter, and use the fill handle to quickly rank all the remaining records in your dataset.
Fully compatible with Microsoft Excel formulas and file formats (.xlsx)Supports advanced logical functions like LET, IF, and IFS nativelyLightweight, fast, and free to use for daily data analysis
microsoft office alternative - wps office

Frequently Asked Questions

Can I use VLOOKUP to assign these ranks instead of nested IFs?

Yes, you can create a small reference table with your percentage thresholds (e.g., 0%, 80%, 100%, 105%) and their corresponding ranks. You can then use the VLOOKUP function with an approximate match (set the last argument to TRUE) to assign the ranks based on the percentage calculation.

Why am I getting a #DIV/0! error in my ranking formula?

This formula error occurs when the goal cell (the denominator in your percentage calculation) is empty or contains a zero. To fix this, use the IFERROR function around your main formula or ensure all goal cells contain valid numbers before calculating.

Does the LET function work in older versions of Excel?

No, the LET function was introduced in newer versions like Microsoft 365 and Excel 2021. If you are using an older version, you must write out the actual calculation (e.g., A2/B2) within each logical test of your IF formula.

How do I format the cells to show percentages?

While the rank formula outputs whole numbers (1-5), if you also want to display the actual calculation in another cell as a percentage, right-click the cell, select 'Format Cells', choose 'Percentage' under the Number tab, and specify your desired decimal places.