Explanation

The IF function checks a condition and returns one of two different results.

Syntax

=IF(logical_test, value_if_true, value_if_false)

Example — Pass/Fail

Student

Marks

Result

Amit

75

Pass

Neha

32

Fail

Rahul

58

Pass

Formula

=IF(B2>=40,”Pass”,”Fail”)

If Marks are 40 or more → Pass

If Marks are less than 40 → Fail

Real-World Uses

  • Pass/Fail
  • Eligible/Not Eligible
  • Paid/Unpaid
  • Profit/Loss
  • Yes/No
  • Bonus/No Bonus

Practice

Create a marks sheet for 10 students and calculate their Pass/Fail status.