The function IF allows you to make logical comparisons between cells or between a cell and an expected value, then returns one value for a TRUE result and a different value for a FALSE result.

Syntax:

= IF (logical function, True value, False value)

Logical function. Is any logical expression that can be evaluated as True or False

True value. is the value to be returned is the logical test if True, default return value is TRUE.

False value. Is the value to be returned if the logical test if false, default return value is FALSE.