The IF function is an example of a formula with values that match conditions. This formula means that if a specified condition or logical test is satisfied, the first action (if true) is performed; otherwise, the second action (if false) is taken.
Locate the IF function by visiting the Function Library, under the Logical category. This is how the IF formula is structured: IF(logical_test,value_if_true,value_if_false), as illustrated in the following screenshot:
Let's try an example of the IF function, as follows:
- Open the IF-Function.xlsx workbook.
- There are two methods you can use to enter the IF function in a formula: