The IF function returns one value if a condition is true and another if it is false. For example, =IF(A1>10, "Yes", "No") will display "Yes" if A1 is greater than 10 and "No" otherwise.