Cellgrids Cellgrids
Home › Practice questions › IFS › Question 2

Excel IFS Practice Question: Write Absent if the marks cell is empty, Pass if the marks are 40 or more,…

By Rinkesh Shah, founder of Cellgrids.

The question

Write Absent if the marks cell is empty, Pass if the marks are 40 or more, otherwise Fail. Put it in C2 to C4.

The data

ABC
1NameMarksResult
2Rahul55?
3Priya?
4Amit30?

The yellow cells are where your answer goes.

Show answer

Expected results:

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

How it works

Explanation: The empty-cell test must come first. An empty cell would otherwise be treated as 0 and give Fail.
Syntax: =IFS(B2="","Absent",B2>=40,"Pass",TRUE,"Fail")
Rahul has 55: Pass. Priya has no marks: Absent. Amit has 30: Fail.

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 →

IFS syntax

=IFS(logical_test1, value1, [logical_test2, value2], ...)

Checks multiple conditions in order and returns the value for the first one that's true. IFS is used to build decision rules directly into a spreadsheet instead of manually judging each row. Full IFS guide.

More IFS practice questions

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