Cellgrids Cellgrids
Home › Practice questions › IF › Question 1

Excel IF Practice Question: Using IF, show Pass if the marks are 40 or more, otherwise Fail. Fill C2 to C4.

By Rinkesh Shah, founder of Cellgrids.

The question

Using IF, show Pass if the marks are 40 or more, otherwise Fail. Fill C2 to C4.

The data

ABC
1StudentMarksResult
2Anil72?
3Bina35?
4Chirag40?

The yellow cells are where your answer goes.

Show answer

Expected results:

  • C2 = Pass
  • C3 = Fail
  • C4 = Pass

How it works

Explanation: IF checks a condition and returns one value if it is true and another if it is false.
Syntax: =IF(logical_test, value_if_true, value_if_false)
Anil: 72 is 40 or more, so Pass. Bina: 35 is below 40, so Fail. Chirag: exactly 40 counts as 40 or more, so Pass.

Try it yourself in the live sheet

Type your formula in the highlighted cell and get instant feedback. Free, no Excel install needed.

Try this question in the live sheet →

IF syntax

=IF(logical_test, value_if_true, value_if_false)

Returns one value if a condition is true, another if false. Flagging an employee as Pass or Fail based on a score cutoff. Full IF guide.

More IF practice questions

All practice questions · Excel exercises · Interview prep · Cheat sheet