IF function
Background

IF is the most crucial function for any decision making. Condition is the starting point of IF. Outcome of condition can be TRUE or FALSE. This outcome drives IF function.

Syntax
=IF(condition,true_expr,false_expr)
1
2
3
condition
Condition to be tested, which evaluates to TRUE or FALSE

true_expr
Value to display or expression to evaluate if condition results to TRUE

false_expr
Value to display or expression to evaluate if condition results to FALSE
Example

In cell B2 we want to check if candidate is major and eligible for voting. So, we will compare if Age in cell B1 exceeds 18 years or not.

=IF(condition,true_expr,false_expr)
Age:

Watch Tutorial
Try Online
Related Articles
Nested IF function
Techniques of handling Slabs