In this example, the formula in cell D2 says: IF(C2 = 1, then return Yes, otherwise return No)As you see, the IF function can be used to evaluate both text and values. In the above example, cell D2 says: IF(C2 = Yes, then return a 1, otherwise return a 2) The value that you want returned if the result of logical_test is FALSE.
The value that you want returned if the result of logical_test is TRUE.
Use the IF function, one of the logical functions, to return one value if a condition is true and another value if it's false.