logo
search
Function Problems

How to Use IF and LEFT Functions in Excel to Extract Grades

Emma BrownEmma Brown Oct 9, 2026 868 views

Question details

The user needs an Excel formula utilizing multiple conditions (IF) and the LEFT function to extract the first two characters of a resit grade when the first-sit grade equals 'MV'.

How to Combine IF and LEFT Functions in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Evaluating student grades by checking multiple conditions and conditionally extracting partial text from a cell.
Observed behavior
Correctly applying a nested IF and LEFT formula to extract the substring, resolving syntax errors caused by missing parentheses.
Before you start

Verify whether your data is structured as an official Excel Table, as the example uses structured references like [@[Resit grade]]. If using a standard range, be prepared to replace these with standard cell references like A2.

Solution 1Recommended

Create a Nested IF Formula with the LEFT Function

Use this solution to evaluate multiple logical tests and conditionally extract a specific number of characters from a text string using proper syntax.

When nesting functions within an IF statement, you do not need to add an additional equals sign before the nested function. However, you must ensure that functions like LEFT have their arguments enclosed in parentheses.

The formula structure evaluates the first condition. If true, it returns a value; if false, it moves to the second IF statement which contains the LEFT function to extract the first two characters of the resit grade.

1
Select the target cell

Click on the cell in your Excel table where you want the final calculated grade to be displayed.

2
Write the first condition

Begin your formula by checking if the resit grade is missing: =IF([@[Resit grade]]="Not found",[@[1st sit Grade]],

3
Nest the second condition with LEFT

Add the second IF condition to check for 'MV' and apply the LEFT function, making sure to use parentheses correctly: IF([@[1st sit Grade]]="MV",LEFT([@[Resit grade]],2),[@[Resit grade]]))

4
Combine and execute the formula

Put it all together: =IF([@[Resit grade]]="Not found",[@[1st sit Grade]],IF([@[1st sit Grade]]="MV",LEFT([@[Resit grade]],2),[@[Resit grade]])). Press Enter to apply the formula to the cell.

Create a Nested IF Formula with the LEFT Function
Syntax Tip: Remember that functions nested inside IF formulas, such as LEFT(), do not require a leading equals sign but strictly require open and close parentheses for their own arguments.
Advanced Formulas in WPS

Process Complex Formulas Easily with WPS Spreadsheet

You can seamlessly build, edit, and troubleshoot nested IF and text functions using WPS Spreadsheet. With its intuitive interface and built-in formula hints, you can efficiently calculate data without syntax errors.

  1. 1. Open your data file: Launch WPS Spreadsheet and open your existing table or workbook.
  2. 2. Start typing the formula: Select your target cell and type =IF( to trigger the formula autocomplete.
  3. 3. Nest the LEFT function: Follow the on-screen parameter hints to easily nest LEFT() without missing the required parentheses.
  4. 4. Apply to the column: Press Enter to execute, and drag the fill handle to apply the formula across your entire dataset.
100% compatible with Microsoft Excel's formula syntax and .xlsx files.Built-in formula builder provides syntax hints to prevent missing parentheses.Lightweight application that handles complex datasets and nested formulas quickly.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my nested LEFT function return a syntax error?

This usually happens if you forget to place parentheses around the arguments of the LEFT function (e.g., LEFT(text, num_chars)) or if you accidentally add an extra equals sign inside the nested IF formula.

How do I convert table references like [@[Resit grade]] to normal cell references?

Simply replace the bracketed table reference with the corresponding cell address. For example, if the 'Resit grade' is in column C row 2, replace [@[Resit grade]] with C2.

What does the number 2 mean in the LEFT formula?

In the function LEFT([@[Resit grade]], 2), the number 2 specifies that Excel should extract exactly two characters starting from the very left side of the text string.