Function Problems

Use a Lookup Table Instead of Multiple IFS Conditions in Excel

Elise WilliamsElise Williams Nov 10, 2026 869 views

Question details

The user wants to map student scores to grades without writing a complicated, nested IFS formula for every possible score threshold.

How to Use a Lookup Table Instead of Multiple IFS Conditions in Excel
Product
Excel
Device & OS
not provided
Scenario
Calculating student grades from a score table based on numeric thresholds.
Observed behavior
The user needs an efficient alternative to lengthy and hard-to-maintain nested IF or IFS statements.
Before you start

Ensure your grading thresholds are organized in ascending order within a dedicated reference table before applying any lookup formulas.

Solution 1Recommended

Use INDEX and MATCH for Flexible Table Lookups

This approach replaces long IFS functions by looking up values in a structured table, making your formula easier to read and maintain.

Whenever there is a temptation to use many levels of IF statements, a table lookup is often more suitable. Using the INDEX and MATCH combination provides a powerful way to retrieve grades based on scores without the limitations of nested formulas.

1
Create a reference table

Set up a table named 'Table1' with two columns: 'Score' (for the threshold values) and 'Grade' (for the corresponding letter grades).

2
Select the target cell

Click on the cell where you want the calculated student grade to appear.

3
Enter the INDEX and MATCH formula

Type the formula: =IFERROR(IF(ISBLANK(G2),"Enter Score Above",INDEX(Table1[Grade],MATCH(G2,Table1[Score],0))),"Score Out Of Range"). Replace 'G2' with the cell reference containing the student's score.

4
Apply the formula

Press Enter to execute the function. The formula checks for blanks, looks up the corresponding grade, and handles out-of-range errors automatically.

Use INDEX and MATCH for Flexible Table Lookups
Why INDEX and MATCH?: INDEX and MATCH are more robust than nested IFs because you can update your grading scale simply by modifying the table, without ever having to edit the formula itself.
Advanced Spreadsheets with WPS Office

Simplify Complex Formulas with WPS Spreadsheet

WPS Spreadsheet fully supports advanced lookup functions like INDEX, MATCH, VLOOKUP, and XLOOKUP. You can easily manage grade thresholds and avoid long nested IFS statements while enjoying full compatibility with Microsoft Excel formats.

  1. 1. Open WPS Spreadsheet: Launch WPS Spreadsheet and create or open your scoring threshold table.
  2. 2. Select your output cell: Click on the cell where you want to output the calculated grade.
  3. 3. Insert the lookup function: Go to the Formulas tab on the top ribbon, click 'Insert Function', and search for INDEX or VLOOKUP.
  4. 4. Apply parameters: Input your lookup value, highlight your reference table array, and press OK to apply the formula efficiently.
100% compatible with Microsoft Excel (.xlsx) formats.Supports advanced formulas including VLOOKUP, XLOOKUP, INDEX, and MATCH.Free and lightweight alternative for powerful data analysis.Built-in error checking to help troubleshoot complex lookup functions.
microsoft office alternative - wps office

Frequently Asked Questions

Why is a lookup table better than a nested IF or IFS formula?

Lookup tables are much easier to read, update, and maintain. If your grading scale changes, you only need to update the table values instead of rewriting complex, error-prone formulas across your entire spreadsheet.

Does the lookup table need to be sorted?

If you are using VLOOKUP or MATCH with an approximate match (match_type 1 or TRUE), the lookup column must be sorted in ascending order. If you use an exact match (match_type 0), sorting is not strictly required.

Can I use Data Validation with my lookup table?

Yes, you can use Data Validation to restrict the input scores to a specific minimum and maximum range (e.g., 0 to 100). This ensures your lookup formula doesn't return unexpected results due to invalid data entry.

What happens if a score is outside the table's range?

By wrapping your lookup formula in an IFERROR function, you can catch calculation errors and display a custom message like 'Score Out Of Range' instead of the default Excel #N/A error.