Maintenance Notification: We are upgrading our servers today so you may experience intermediate outages. Thank you for your patience.
Perform logical operations in formulas
MO-211

Perform logical operations by using the IF() function

=IF(B2>=70, "Pass", "Fail")

If the score in B2 is at least 70, show Pass; otherwise show Fail. Fill it down: every row gets its own test.

What the MO-211 task asks

MO-211 is performance-based: you build the answer in a live workbook. In our MO-211 practice exams an IF task never says IF. It describes a label that depends on a value — “show Discharge review when Sessions is at least 12 … otherwise show Continue”, or “label each passenger by Age: under 16 is Child, 65 and over is Senior, otherwise Adult”.

Read the comparison words closely, because they decide the operator: “at least” and “or more” are >=, “over” and “more than” are >, “under” is <. With three or more labels, the task wants a nested IF (or IFS) that tests the bands in order, and the text of each label typed exactly as the task gives it.

Our grader checks the value in every cell of the target range. It reads the values, not the function, so any formula that produces them earns the points — but one wrong cell fails the whole range.

Worked examples

Type these into a blank sheet to follow along. Every result below is what Excel showed.

Exam scores (the video fills C2:C6)
ABC
1StudentScoreResult
2Ana82Pass
3Ben64Fail
4Cara70Pass
5Dev91Pass
6Eli58Fail
One test, two outcomes
=IF(B3>=70, "Pass", "Fail")
Returns Fail

Ben's 64 is not at least 70, so IF returns its third argument.

“At least” includes the boundary
=IF(B4>70, "Pass", "Fail")
Returns Fail

Cara scored exactly 70. With > she fails; with >= she passes. “At least 70” means >=.

A number instead of a label
=IF(B3>=70, 0, 70-B3)
Returns 6

IF can return a calculation: the points Ben is short of a pass. A student who passed gets 0.

Nested, for three bands
=IF(B5>=85, "Merit", IF(B5>=70, "Pass", "Fail"))
Returns Merit

The second IF is the first one's false result. Dev's 91 meets the first test, so the inner IF is never reached.

Filled down a column
=IF(B2>=70, "Pass", "Fail")
Returns Pass, Fail, Pass, Pass, Fail in C2:C6

B2 is relative, so each row tests its own score. Cara's 70 passes because the test is >=. This is what the video below builds.

Watch it done in Excel

The last example above, recorded in real Excel on the same grid.

Exam traps

Testing the bands in the wrong order

IF stops at the first test that is true. =IF(B5>=70, "Pass", IF(B5>=85, "Merit", "Fail")) returns Pass for Dev's 91: the Merit test is never reached. Test the highest band first.

> where the task says “at least”

=IF(B4>70, "Pass", "Fail") fails Cara on exactly 70. One boundary value is all it takes to fail the range.

A label without quotes

=IF(B2>=70, Pass, "Fail") returns #NAME?, because Excel reads Pass as a name it does not know. Text results go in double quotes.

Leaving out the false result

=IF(B3>=70, "Pass") returns FALSE for Ben, not a blank and not Fail. If the task names a result for the other case, it needs the third argument.

FAQ

Is IF's text comparison case-sensitive?

No. =IF(A2="ana", "Yes", "No") returns Yes, though A2 holds Ana.

How do I test for an empty cell?

Compare it with empty quotes. =IF(B7="", "No score", "Scored") returns No score, because B7 is empty.

Nested IF or IFS?

Either, when the task describes the result: our grader reads the values. IFS is easier to read for three or more bands; IF is the one to use when there are only two outcomes.

New to this function?

This page covers what the exam asks. For the full how-to — every argument, more examples and a practice workbook — read our guide on dfwexcel.com.

The IF function, explained — dfwexcel.com

Try it under exam conditions

Take a full, timed MO-211 practice exam, upload the workbook you built, and get a score out of 1000 with a per-task breakdown of where the points went. Your first one is free.

No credit card needed.