Explanation

The IF function checks a condition and returns one value when the condition is TRUE and another value when it is FALSE.

Syntax

=IF(logical_test,value_if_true,value_if_false)

Arguments

Argument

Meaning

logical_test

Condition to check

value_if_true

Result when condition is TRUE

value_if_false

Result when condition is FALSE

Example — Employee Bonus

Employee

Sales

Bonus

Amit

120000

 

Neha

85000

 

Rahul

150000

 

If sales are ₹100,000 or more:

=IF(B2>=100000,”Eligible”,”Not Eligible”)

Result

Employee

Sales

Bonus Status

Amit

120000

Eligible

Neha

85000

Not Eligible

Rahul

150000

Eligible

Real-World Uses

  • Pass/Fail
  • Eligible/Not Eligible
  • Yes/No
  • Target achieved/not achieved
  • Bonus eligibility
  • Stock status

Practice

Create an Employee Target sheet and classify employees as Target Achieved or Target Not Achieved.