Formula Errors

How to Write an Excel Nested IF Formula for Eligible or Ineligible Categories

Kushani NimanthikaKushani Nimanthika Nov 2, 2026 870 views

Question details

The user needs a formula to classify a numeric value into specific text outcomes based on defined number ranges without the logical conditions overlapping.

How to Use an Excel Nested IF Formula to Return Eligible, Ineligible, or Follow Up
Product
Excel
Device & OS
not provided
Scenario
Categorizing data points into text groups ('Eligible', 'Ineligible', or 'Follow Up') based on multiple threshold ranges (2–20, 21–70, 71–85, and 86 or higher).
Observed behavior
Requires a correctly structured nested IF statement evaluating from the highest to the lowest value to ensure each number falls into the exact correct bucket.
Before you start

Identify the target cell containing the value you want to evaluate and firmly define the numerical boundaries for each category before constructing your formula.

Solution 1Recommended

Use a Nested IF Formula Evaluated from Highest to Lowest

Construct a nested IF function that tests the highest threshold first to ensure values are categorized accurately without logic overlap.

When evaluating greater-than conditions using a nested IF function, it is essential to evaluate the conditions in descending order. Since spreadsheets evaluate IF statements left-to-right, testing the highest value first prevents a lower threshold from prematurely capturing a higher value.

1
Select the output cell

Click on the cell where you want the categorization text to appear.

2
Enter the nested IF formula

Assuming the value to evaluate is in cell A1, type the formula: =IF(A1>=86,"Ineligible",IF(A1>=71,"Follow Up",IF(A1>=21,"Eligible",IF(A1>=2,"Ineligible",""))))

3
Apply to other cells

Press Enter to calculate the result, then drag the fill handle down to apply this formula to the rest of the cells in your data column.

Use a Nested IF Formula Evaluated from Highest to Lowest
Handling Values Below 2: The final empty string "" in the formula ensures the cell remains blank if the value is below 2. You can replace "" with a text string like "Out of Range" if you prefer a explicit label.
Advanced Formula Support

Write and Test Nested Formulas Smoothly in WPS Spreadsheet

WPS Spreadsheet fully supports advanced logical functions including IF and IFS. It provides color-coded syntax highlighting and intuitive tooltip hints to make writing nested formulas error-free.

  1. 1. Open your spreadsheet in WPS: Launch WPS Office and open your workbook containing the data to be categorized.
  2. 2. Access the Formula tab: Navigate to the Formula tab on the top ribbon and select 'Insert Function' to find logical functions like IF or IFS.
  3. 3. Input the conditions: Follow the intuitive dialog box to enter your logical tests and return values, or directly type your nested IF structure into the formula bar.
Fully compatible with Microsoft Excel formulas, functions, and file formatsColor-coded brackets help identify missing parentheses in nested formulasBuilt-in formula evaluation tool to troubleshoot complex logic step-by-step100% free and lightweight spreadsheet application
microsoft office alternative - wps office

Frequently Asked Questions

Why is my nested IF formula returning the wrong category for high numbers?

This happens when the logical conditions overlap. In a 'greater-than' formula, you must test your thresholds from highest to lowest. If you test '> 20' before '> 80', the formula will see that 85 is greater than 20 and stop evaluating, returning the wrong category.

How many IF statements can I nest in a spreadsheet?

In modern versions of Excel and WPS Spreadsheet, you can nest up to 64 IF functions. However, if you need that many conditions, it is much easier to maintain a separate reference table and use a VLOOKUP or XLOOKUP function.

What does the empty string at the end of the IF formula mean?

The "" (two double quotes with nothing between them) at the end of the formula tells the software to display a blank cell if none of the previous logical conditions are met. Without it, the formula would simply return the word 'FALSE'.

Can I use VLOOKUP instead of a nested IF for categorization?

Yes. For categorizing more than three or four ranges, creating a small reference table and using VLOOKUP with an approximate match (setting the last argument to TRUE) is often cleaner and easier to update than a long nested IF formula.