The IF function

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:

  1. Open the IF-Function.xlsx workbook.
  2. There are two methods you can use to enter the IF function in a formula:

Get Learn Microsoft Office 2019 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.