Function Problems

How to Calculate Average Letter Grades with Excel Lookup Formulas

Amos GikundaAmos Gikunda Oct 29, 2026 870 views

Question details

The user needs to convert letter grades (like M, D/M, and D) into numeric percentages to calculate their average using lookup formulas, and then convert the numeric average back into a final letter grade.

How to Calculate Average Letter Grades Using Excel Lookup Formulas
Product
Excel
Device & OS
not provided
Scenario
Calculating grade averages from a dataset containing text-based letter grades instead of numbers.
Observed behavior
Because spreadsheet software cannot directly average text values, a formula combining AVERAGE with a lookup function (VLOOKUP or XLOOKUP) is required to map the letters to a numeric conversion table.
Before you start

Ensure you have created a reference table in your worksheet that explicitly maps each letter grade to its corresponding numeric value or percentage.

Solution 1Recommended

Calculate the Average Using XLOOKUP (Newer Versions)

Use the XLOOKUP function paired with AVERAGE to find numeric values and calculate the mean in a single step. This is the most efficient and recommended method for modern spreadsheet software.

XLOOKUP is natively designed to handle arrays and ranges seamlessly. It can extract the numeric equivalents of your letter grades and pass them directly to the AVERAGE function without needing complex array keystrokes.

1
Select the target cell

Click on the cell where you want the numeric average to be displayed.

2
Enter the XLOOKUP average formula

Type the formula `=AVERAGE(XLOOKUP(E3:E8,$A$2:$A$12,$B$2:$B$12,""))` and press Enter. Ensure `E3:E8` represents your students' letter grades, `$A$2:$A$12` is the letter column in your reference table, and `$B$2:$B$12` is the numeric column.

3
Convert back to a letter grade

To turn the resulting numeric average back into a letter grade, select a new cell and use XLOOKUP with an exact match or next smaller item mode, such as `=XLOOKUP(E10,$B$2:$B$12,$A$2:$A$12,"",-1)`.

Calculate the Average Using XLOOKUP (Newer Versions)
Match Mode Tip: Using `-1` as the match mode argument in XLOOKUP ensures that if the exact average isn't in your table, the formula assigns the appropriate grade based on the closest lower threshold.
Efficient Grade Management

Calculate Grades Seamlessly in WPS Spreadsheet

WPS Office perfectly supports advanced array formulas, VLOOKUP, and the modern XLOOKUP function. It allows you to easily process student grades, handle dynamic arrays, and perform complex lookups without hassle.

  1. 1. Open your gradebook: Launch WPS Spreadsheet and open your existing file containing the student letter grades.
  2. 2. Set up a reference table: Create a simple reference table in an empty range mapping letter grades (e.g., A, B, C) to their numeric values (e.g., 90, 80, 70).
  3. 3. Insert the lookup formula: Navigate to the Formulas tab, or directly type your `=AVERAGE(XLOOKUP(...))` formula into the destination cell.
  4. 4. Calculate instantly: Press Enter to execute the calculation. WPS Spreadsheet handles the array processing automatically to deliver precise results.
100% compatible with Microsoft Excel formulas and file formatsFull support for modern functions like XLOOKUP, VLOOKUP, and AVERAGEFree and lightweight alternative for robust data analysisBuilt-in templates for education, grade tracking, and reporting
microsoft office alternative - wps office

Frequently Asked Questions

Why does my VLOOKUP return a #VALUE! error when averaging multiple grades?

This usually happens because standard VLOOKUP is designed for a single lookup value, not an entire array or range. To fix this, ensure you are wrapping the VLOOKUP in an IFERROR function and pressing Ctrl+Shift+Enter to create an array formula, or switch to XLOOKUP if your software supports it.

How do I ensure the final average translates to the correct letter grade?

You must use an approximate match approach. With XLOOKUP, set the match mode parameter to -1 (exact match or next smaller item). If using VLOOKUP, ensure your reference table is sorted in ascending numerical order and set the range_lookup parameter to TRUE.

Can I use XLOOKUP in older versions of spreadsheet software?

No, XLOOKUP is a relatively modern function introduced in newer versions (like Excel 2021, Microsoft 365, and the latest WPS Office updates). For older versions, you must rely on VLOOKUP array formulas or an INDEX and MATCH combination.