Table of Contents
The Excel IF function tests a logical relationship and outputs a result for true or false that can be defined by the user.
=IF(logical_test, [value_if_true], [value_if_false])
logical_test = the relationship to test, usually a comparison of cells and/or values
value_if_true = [optional] this is the value that will be returned if the logical test is true. If blank this will return “TRUE”
value_if_false = [optional] this is the value that will be returned if the logical test is false. If blank this will return “FALSE”
The IF formula will return a either the user defined value for the true or false result, depending on the logical test statement. If no true or false values are provided by the user, the IF formula will return “TRUE” or “FALSE”.
In the example above the IF formula tests whether cell F6 is greater than 1000.
=IF(F6>1000, “Yes”, “No”)
Because the value in cell F6 is $930 and therefore less than 1000, the IF formula returns the [value_if_false] result, of “No”.